I'm an American Muscle car guy, but I own, and play with a couple of BMW's...
Maybe this will help.
If it were an American car, I would say the "lock up" function on the torque converter is malfunctioning, or is otherwise connected wrong.
On american cars, when they do this, the "lock up" is engaged, and when you drop it into gear, it's like "dumping the clutch" on a manual tranny car at idle.... But with the automatic, there's enough "cushion" in the auto tranny that the car wont jump forward....
Can you start/run the car when it's in neutral?
If you can, have someone push your car up to about 10 mph, then drop it into gear while it's rolling. If it runs and drives, but dies when you come to a stop, then you have found your problem. The solution is to then find where you have wrongly connected the wires.
Or it may be a vacuum leak that kills it when you put load on the engine [by putting it into gear] Lotts of Vac lines on BMW motors, check your routing.
That's about all I can think of right now... Good luck
The "buick" guy