There's tons of knowledge here in this forum, but just like Google, you have ask the right question and give us a little more to work with.
First off, if the Jeep originally had the 4.0, why was the PCM changed?
Second, why change wiring?
If I'm reading the original post correctly, the Jeep came from the factory with the 4.0. If that's right, a simple long block changeout would have been an easy deal.
So from my standpoint, I'm trying to figure out where the whole thing went crazy and start from there.