Welllllll, we can't let this post die without any responses, so go here for info on the 340:
http://www.alpar.com
I suspect you already know that nothing is going to fit up. I also suspect that won't disuade you one bit. IIRC the 340 is a Chrysco engine (duh), and is different than the 343/360 AMC. Plenty of those in CJs. That XJ engine bay is none too big.
What did you have in mind for a tranny/trans case?
That 340 was a real screamer. Are you going to paint the XJ yellow and add a super tall spoiler? Bzzzzz. Oops. The Super Bee is what i was thinking of. The Super Bird had the tall spoiler. Either way, killer engine.