CJ-7 and YJ tubs are similar. The frames are not.
YJ frame is wider than a CJ-7. You'd need to move the spring perches on hte axles outboard to match. Actually, I don't think there's enough room to grow outboard on a narrowtrack CJ axle (used up until 1982 when CJ-7 went to wide track axles).
If there was enough room, you'd need a new U-bolt and springplate for the front passnger side. The CJ-7 inboard U-bolt stradles the diff. casting.
CJ-7 front leafs are 2" wide, YJ is 2.5", you'd have to change front spring anchors.
I'm not sure about rear spring locations (both CJ-7 and YJ are 2.5" wide), but YJ rear springs are flat, CJ's are arched. I'm thinking YJ and CJ rear spring mounting hieghts off the frame are different heights.
The rear 2 sets of body mounts don't line up (rear crossmember and teh set in front of the rear wheels). This is easily overcome though.
The YJ front clip is longer than a CJ, I think you'd get into custom grill mounting to get the YJ fenders/hood to line up. Probably have to cut the Cj front crossmember off. then the steering box is right there, that would need to be addressed.