The Engine Control Module (ECM) on a 2002 Pontiac Grand Am is typically located
underneath the hood, near the firewall on the driver's side. However, it's often mounted to a bracket or hidden somewhat by other components. You may need to look closely and possibly remove some shrouding or covers to see it clearly.
It's a good idea to consult a repair manual specific to your 2002 Pontiac Grand Am's engine (e.g., a Haynes or Chilton manual) for the exact location and pictures. These manuals often have diagrams showing where the ECM is, and how to access it.