Couple things on this.
Engine light on should log a code, don't guess what it can be, check coded first then post up here.
The replacement engine, did you check/replace plugs, leads, oil & filters?
Always good to check and service it so you have half an idea it has a good start to life in...