o.k.,one of the most common failures that can cause this problem that I have seen before is the Torque converter solenoid (TCC solenoid).This solenoid can stay stuck on and cause the torque converter to stay locked up,this will cause the vehicle to stall whenever it is put into gear.The vehicle will start and run fine in park or neutral but will stall out as soon as it is put into gear.This is the most common failure that can cause this.
Also a malfunctioning idle air control valve can cause this,if the valve isnt moving or repsonding to bump up the idle when put in gear it may cause the vehicle to stall out,the computer commands this valve to allow more air in to bump up the idle to compensate the load on the engine when put in gear,if it isnt moving or isnt moving fast enough the idle may be to low and could cause the engine to stall out.
Also when the vehicle is put in gear the engine and trans move slightly under the hood,if there is a wiring harness that is chafed or cut into it may be grounding out when the engine or trans moves and could be shorting out a component or computer which can cause a stall condition,the engine harness may need to be checked over to see if any wires are cut into,I have seen this before as well.
The most common is the TCC solenoid as I have seen allot of these fail on allot of different GM vehicles,these listed above could be what could be causing the failure and some ideas of what to check into.
A completely failed torque converter that is permanently locked up can cause this as well,not as common but I have seen failed torque converters cause this and can be hard to diagnose.Sometimes they have to be removed from the transmission and checked into.
I hope this information helped,If you need anything else let me know,If you feel satisfied that I have assisted please click accept as this is how I get paid,positive feedback is appreciated,Thanks Pete.