Tranny? Torque converter malfunction can do that. What you described happened to my '95 Crown Vic a few months ago, but it would move a few feet in gear before it died. After a few more tries it wouldn't move at all. End of this week it gets towed to a very reputable and experienced trans shop for a rebuild. Maybe it's the trans.
Will it start and stay running in neutral? If so, put it in gear from there and observe.
When you put it in gear, did it move forward at all before the engine died?
Also, a loose ground wire anywhere can also stop your engine. Same for corrosion between ground wire and ground. GM issued a bulletin some years back that recommended (for older vehicles) checking ground wire connections for corrosion or loose wires. Vibration (like putting it in gear) can be enough to jiggle a ground and shut off your engine. I had that problem with an '87 Chevy that would die or stumble inexplicably and then go back to normal as if it was fine. I actually checked the ground wires by bumping them with a screw driver and nothing happened. Took the car to a top notch repair shop and they couldn't locate the problem even with their expensive engine analyzers. Their friend at the Chevy dealership asked if they could take a look at it. They couldn't figure it out. A week later the repair shop called me and apologized for taking so long and still not fixing it. They wouldn't charge me anything since they hadn't fixed it.
A couple days later it died right when I started it and put it in gear. I tried again and it started fine, so I raised the hood and even though I had already wiggled the ground wires a few weeks prior, I tried wiggling one of them again and the engine immediately died. I restarted it and jiggled the same ground and it died again. I had finally solved my problem.
Good luck and please tell is how it turns out and what it was.