Why cant you just swap it over? They are the same inline 6.....
Anyway if yo decided to stroke your current 4.0 you'd need the crank, the rods & pistons. Idk what they do head wise but if its ported or anything you'd want that..and then again thats the basics of the motor thats already built?
Crankshaft,pistons,possibly head depending on year and casting numbers,and maybe camshaft! As far as I know that's it,I'm sure one of the more experienced members will chime in. The blocks aren't interchangeable I believe they changed in or about 2000 so any good internals are what you can keep as far as I know
The block can not be used as there are many mounting differences, but all internals will swap over. The head is different, but it can be made to work. The exhaust ports are slightly different from the TJ's 0331 head and its lacking coil pack mounting bosses. There are a few solutions to those. Alternatively the valve train can be swapped from the 98 head to the 06 head, but machining maybe required depending how the springs and valves were setup.
XJ Cherokee and ZJ Grand Cherokee 4.0L engine blocks interchange.
2000+ TJ Wrangler and WJ Grand Cherokee 4.0L engine blocks interchange.
XJ/ZJ blocks and 2000+ TJ/WJ blocks do not interchange without significant modifications. (1997-1999 4.0L TJ Wrangler blocks will interchange in XJ/ZJ and visa-versa).
TJ/WJ 4.0L Engine blocks underwent clean sheet design changes effective in the 1999 WJ Grand and 2000 TJ Wrangler. These blocks are not interchangeable with XJ/ZJ engine blocks. The reason is motor mount bolt holes and belt driven accessory mounting bolt holes are in different locations, or not present at all, TJ/WJ vs. XJ/ZJ.