I have a 2006 Chevy Malibu SS and it will not drive on D only on M. Also engine light came on.
You will probably need to get the car to the Chevy dealer to have them diagnosis the problem with a scanner to determine what trouble code is causing the problem.
The check engine light is on indicating a problem with the transmission and or the engine. There are some trouble codes that share a code with the engine and transmission.
The scanner will direct the mechanic to the area of the problem so he can perform a more specific diagnostic procedure to pin point the problem.
There is a service bulletin on the friction material inside the torque converter causing shift problems inside the transmission and it is possible that transmission disassembly is required to clean valves, servos and shift solenoids to repair the problem if possible.
Transmission replacement is also possible and the transmission cooler should be flushed out.