While some engines *might* be physically close in size, the differences in mounting points, transmission compatibility, computer systems (ECU), wiring harnesses, and exhaust systems are massive hurdles. You'd need custom fabrication work for many components, and even then, success isn't guaranteed.
Instead of focusing on interchangeable engines, consider the possibility of rebuilding or replacing the existing 2.4L engine. That's a far more practical and cost-effective approach compared to trying a complete engine swap.