Likely need to swap the crank and LH cam sprocket from the old engine. The tone wheels for the crank and cam sensors are part of those sprockets, and there are a couple different patterns.
Its best to start a.new thread for your problem. Things that can cause bad running- first things to check, in no particular order -
Bad fuel, Bad coolant temp sensor. Low fuel pressure, blocked cat.