how good are you with DVOM?
If you are good and if you serious to follow my instructions I will write them for you but if you are not going to use them or don't know much about electrical testing then I would hate to waste my time and wold recommend you to give this to pro. But if you have time and if you try to follow my instructions to the end you will narrow it down and solve it 100%. 3100
just short introduction:
it could be bad icm ignition control module, ckt 424 (tan/black wire at the icm connector) shorted to ground or open, and or ckt 423 (white wire at the icm connector) shorted to ground or bad pcm. I can tell you how to test this to narrow it down, but if you have extra icm (ignition control module) part that holds your ignition coils I would suggest you to try it and see if it fixes if not then we will go slowly from a-z and try to narrow it down. Test iac for resistance between terminal a -b and c-d both measures should show more than 20 ohms.
If I only had one guess for this problem to save my life I would say bad pcm ( check connectors at the pcm for bent pins) try another pcm from junk yard but try to find grand am with same options as your car. Or open several pcms on junk yard and take several PROMS to test them. I agree with Danny. But for you it is easier to find similar GA and take complete pcm I got mine for 22$ for 3.1