My 4.0L sold, still have the trans though. If it's a bad knock on the bottom end, it could be a bad bearing. Mine let go on Hwy #2 and even if I would have stopped at the time once I heard the engine knocking (about 5 secs before it left a hole in my block), it would have needed a bottom end rebuild which is expensive. More expensive than what I could have got a good used motor for, if I could have found one at the time. I'd get Chanda look at it to let you know how bad it is before you do anything, just so you know.
IMO, look out for something used, 2000 + model year. In 2000, they moved the alternator up and changed the intake slightly, I believe. While you wheel your Jeep this summer, you could get the old block built into a stroker and then sell the slightly used one later on. Otherwise, building a stroker locally is $$$$ ($4K+). It's almost cheaper to buy a stroker out of the states, Titan Engines was the cheapest I found at around $3000 US + core.