First off, you don't have a 4.0L V
-6. That would be a front wheel drive car engine (or the minivan engine the current Wrangler uses). You have a 4.0L Inline
6 cylinder. That is a bullet proof reliable old tractor style engine.
Now, on to the actual meat of your questions.
You have a 42RE transmission and it sounds like a NV231 or NV242 transfer case. The one you're looking at has a 44RE transmission and a NV249 transfer case. The transfer cases are interchangeable (with a couple small modifications). But there is nothing about the two transmissions that would be interchangeable. The bellhousing on your existing transmission is an integral part of the transmission housing, and the 5.2L V-8 has a much different bolt pattern. Plus the TCU's wouldn't be interchangeable.
Wow, that's what I get for watching "Fleming : The Man Who Would Be Bond" while answering. Took me too long and others answered first.