From one TJ to another, yeah, it's basically that simple. If, say, you wanted to swap a ZJ's V8 powertrain in, though, it'd be a bit more difficult. You'd need to create engine and transmission mounts for it, and possibly use different-length driveshafts.
But yeah, if you wanted to put the whole drivetrain of another TJ into yours, it'd be as simple as finding a donor with all the parts intact, and changing them over. Of course, the only real reason to do it that way is if the donor is cheap and has frame and body damage, or is otherwise unusable, but its mechanical bits are all in better condition than yours.
1997 Grand Cherokee Orvis Edition - 82,000 miles
Those tow hooks aren't there for me. They're there for the XJs.