Your Grand Am uses PasslokII which relies on the ignition lock cylinder to send a code to the computer, if the lock cylinder has failed, it won't be doing what it's suppose to do properly and won't allow the fuel pump to run hence your vehicle won't start or it will but then dies right away. Chances are the it's faulty and needs to be replaced, but by doing so the computer needs to be reprogrammed also to recognize the code of the new lock cylinder. Chances are this will have to be done a GM dealership

unfortunately...
Marc