It probably with swap. Just remember to get all the computer stuff from the donor. You will need it and it is not on the cj most likely. Unless that is not the original engine.
1978 CJ7, frame off rebuild, NV3550, Dana 300(twin stick with a sight tube), I6(258), Dana 44 Scout Axles with 4.09 gears, truetrac LSD. The rest yet to be decided.