In principle, theory, on paper, in your mind, it's a pretty easy bolt-in swap. You might just need to retune the SU's for the bigger engine (I don't know SU's). The dimensions of the parts are the same.
In reality, you'll break a bunch of bolts and studs when removing various parts, like manifolds or exhaust pipes. So you just need to be prepared to fix some broken stuff. If you really want to be prepared you'll have some taps and tap drills waiting and just decide to replace parts that might or might not need it, like manifold bolts or studs.
I'm not sure, but I think that the 240Z exhaust manifold and exhaust system might be a little restrictive for a bigger motor. I think that they're restrictive for the stock L24 even before you start. The pipes look small compared to 280Z pipes (you'll see if you compare).
The 5 speed transmission will bolt right in. The shifter or shifter opening might need some work, or not, 1972 might be big enough. Early cars couldn't handle the throw of the 5th gear position.
Overall, it's easy. But the broken bolts will be aggravating. And, of course, there's the "what should I do while I have it out" project bloat. Clutch, flywheel resurface, rear main seal, transmission front seal...etc.
Bookmarks