I assume you are fitting a scrap yard engine.
My first thought would be to take the plugs out, with ignition off, turn the engine by hand and by putting a thumb over each spark plug hole in turn, check for compression on each cylinder (firing order 1-3-4-2)
Have you replaced the cam belt and idler (and maybe water pump)?
If so, are sure timing is correct, did you check the camshaft actuators?
Wrong wiring should show on diagnostic tool, and ignition faults.
These are just general steps in the dark - due to very little information.