p0720 / p1391 codes on 1998 Jeep Grand Cherokee

I installed a used 4.0 with a 1997 casting date on the block.had to change the flywheel & a/c brackets. i used the ones from the old engine that was in this truck.I used the dist. & pick up also. The engine would not start.I replaced the crank sensor.Now it would try to start but sounded like timing problum. Checked timing :# 1 cyl ,comp stroke,3/16 pin in dist. to aline ,used 4.0 hole in pick up.everything ok no start. removed cap and turned while cranking engine started.put cap on and moved wires counterclockwise one hole . engine runs good .drive about 1 hour on highway at 65mph no trouble.next day start up and backup to garage and mil on p0720. replace speed sensor on trans output shaft clear code. drive jeep mil on at about 15 mph. ?? drive back home , engine missing .check codes p1391 , p0720 ?? new plugs & wires. I had a blown horn fuse replaced fuse horn works. engine runs ok until it warms up then it acts like it was shut off & on rpms jumping .?? Are all 4.0 dist. the same? don't know why i had to move wires ? Any Help would be appreciated. Dealer said trans. had 2 speed sensors, hains manual was wrong.dealer put dist. in correct. Now i have problums with wipers come on when i start the engine,the radio searches but cun't find a station, the engine has a miss the dealer said is from the electrical system anyone had any of these problums ?

1 answer
Engine replacements can cause a variety of problems depending n the age and condition of the vehicle and wiring harnesses. Old wiring can have insulation breaking off inside the loom, brittle or broken wire, bad connectors etc. You will have to spend some time carefully inspecting the entire engine compartment wiring as a start.