Here's what you need to consider:
* Engine Type and Year: Identical engines from the same year are the easiest swap. Even slight variations within the same engine family (e.g., different horsepower ratings) can sometimes require modifications to the wiring harness, fuel system, or even mounting brackets. Different engine families (e.g., a V6 in one car and a 4-cylinder in the other) will require substantially more work.
* Transmission Compatibility: The transmission must be compatible with the engine. You'll likely need to swap the transmission as well to match the engine from the '95 car.
* Wiring Harness: The wiring harnesses are probably different. You might need to splice and modify the harness from the donor car ('95 Grand Am) to work with the recipient car ('94 Grand Am).
* Engine Mounts: While the engine block might be similar, the engine mounts could be slightly different, requiring modification or replacement.
* Computer (ECU): The engine control unit (ECU) is likely to be different. You'll need the ECU from the '95 Grand Am and potentially need to have it programmed or re-flashed to work correctly in the '94 Grand Am. This is a crucial aspect; a mismatched ECU can lead to poor performance or even damage the engine.
* Exhaust System: The exhaust system might require modification to fit the new engine.
In short, while the swap *is possible*, it's a significant undertaking that demands mechanical expertise. It's not a job for a beginner. You should have experience with automotive repairs, including engine swaps, wiring harnesses, and computer systems. Without that experience, you risk causing damage to the vehicle.