What size engines are they? Are they the same displacement? If they are, chances are you can swap them. If not find the same engine or you'll run into all sorts of issues with the electronics. An engine swap on a modern FWD car is a ton of work so you want to get it right the first time.
Search Pontiac Grand Prix Questions
Pontiac Grand Prix Experts