I did my 5.2 swap back in 2006 so prices aren't the same.
Dodge said the 5.9 made 245-265 HP & 330-360 TQ but many say they were under rated and I'd agree. As far as fuel economy goes with the 5.2 got what others with 4.0's were getting more or less. I say this because when we'd run a trail together and then fill up we'd take about the same amount of fuel.
https://www.jeepforum.com/threads/wrangler-magnum-v8-discussion.1365878/#replies
This is about the best Magnum swap thread I know about out there. And if you read through it you'll find guys who said they did their swaps for under $2K after selling off the donor rig and Jeep parts.
The HARD part now is that you can't find a low mileage Magnum V-8. And I wouldn't do a swap on anything with more than 100,000 miles without rebuilding it first.
What is your plan for the rest of the drivetrain? Automatic or manual?
If you were closer I could sell you a stroker kit for the 5.9 making it a 6.7... And a pair of old school EQ heads & a built 46RE transmission.... It's what came out of my TJ when the block cracked due to a FUCK UP on the machine shop part.
I've got a 5.7 Hemi and 545RFE in my TJ now... But I'd lucked out and found another 97 TJ with a Hemi swapped into it but had a bad transmission.