You'd need to do a significant amount of research to determine compatibility, comparing part numbers and specifications. Even if the engine block itself seems similar, the ancillary components (like the alternator, power steering pump, etc.) might not be interchangeable.
In short: Don't assume compatibility. Thorough research and/or consultation with a mechanic experienced with these vehicles is highly recommended before attempting such a swap. It's a much more involved project than simply swapping engines.