Remove the electronic ignition control unit (I think that's the name) on your distributor from the engine that ran, and put it on the engine that doesn't run.
Wait...nevermind that won't work. You'll need to go get a new one and it will come with a special anti heat compound that has to be applied to the back of it when installing it on the distributor. You can put the one from the old engine on there, but I'd expect it to fail within a few weeks. It should be good for testing though, and who knows, maybe will last longer.
That would be my first guess so long as you've checked every other possibility: firing order, coil (test with timing light and test primary resistance), fuel pressure, double check spark plug gap, compression test, and so forth.
If you have one of the older EFI designs then you're stuck with 2 fuel pumps: one primer pump in the tank, and one high pressure pump on the driver's side of the frame in front of the gas tank. If the primer pump goes out, the HP pump will be soon to follow but will give sporadic fuel pressure. Both must be changed out at the same time.