The diesel clatter 4.0s make is usually varnished hydraulic lifters. If you listen the sound is usually loudest from the cam side of the engine.
Unfortunately, the OP's engine is not making that sound. The rhythm is different and it is much more pronounced. I'm 99% sure that is a broken piston skirt. If you pull the oil pan you will likely find piston pieces in the pan.
Fixing it all depends on how much damage there is and how scored the cylinder bore is. I've read about a few guys pulling the damaged piston out, throwing a new one in and slapping it back together with no issues. It all depends on the damage done, and what the Jeep is worth to you. Is the body in good enough shape for a newer engine? Maybe a good used one? Stroker? It's really up to you and your wallet.
I'd also like to add that a V8 swap while not impossible is a hell of a lot of work. Lots of custom fab needed to fit the engine in not to mention wiring, transmission control, etc. You would be better off just buying a V8 Grand Cherokee if you wanted a V8. Stroker engine is much easier, bolts right in, and has a ton of power.
**I would also not drive this Jeep while it is making this noise to avoid damaging the engine more, or possibly putting a connecting rod through the side if the piston comes apart completely. **