I am finishing up a swap with a GM 4.3L V6 into my 2.5L YJ. Replacing the engine, transmission, transfercase, fuel delivery, driveshafts, radiator, ECU, and other random parts has cost me about $1700 and I still don't have all the parts I need to finish. That price is total cost of parts without having sold my old engine and t-case. Swapping a Jeep 4.0L should not cost this much since you should be able to reuse a lot of original parts. I do know that you have to move engine mounts forward to fit the 4.0 in place of a 2.5L. Have you considered using a V6? It is a lot more light weight than in I6 and the GM V6 is supposed to produce around 200 HP and 274 ft. lbs.