Yeah, the 4hp22 out of any car will work, all you'll need to change depending on what it comes out of are the bellhousing, the valvebody. and possibly the tailshaft and housing (if it's out of a 4x4 Range Rover. Also, I've been told by a ZF rebuilder near me that the 4hp24 will bolt to anything that the 4hp22 will bolt to, uses the same wiring, and has beefier parts. The only downside is that it's 1/2 an inch longer, and the same thing that will fail on a 4hp22 is what will fail on a 4hp24, which is the planetary. So basically all the beefier internals are useless on the 24 because it will fail in the same way.
Just an FYI, in case you can find a 24 on the cheap.