I just bought a used 2001 E320. It has 50K miles (I think). Two days ago, I started the car but it would shift out of park. I turned the car on and off a few times and got it into Drive. But once in Drive it wouldn't shift back. It also would get our of first gear and the tritronic shift wouldn't allow it to engage the gears. I brought it home by driving in in first for about two miles through the back roads. This morning I noticed there was fluid under the car on the driveway. I take it was tranny fluid. The check engine list is now on as well.
Opening is on the passenger (right) side near the fire wall. You might have a red plastic piece on the black cap. This will have to be broken to remove the cap. However it is only a cap i.e no dipstick. so unless you have a tranny dipstick (pn 140 289 15 21 00) adding fluid is risky.
I have read posts with similar problems to yours. It seems to me that most of the problems were with trans fluid leaking into the wiring and then into the transmission control unit (tcu). Use the search to find out more.
I had same problem with my 2001 E320 under factory warranty. Dealer changed gasket and I am sure trans oil, too. The other gentleman described it very nicely. I believe manual says it takes 8.5 qt. to replace. Be extra careful to put correct amount of oil.
When I changed Mine I needed put in 7.5 liters (yes it is sold in liters). The pan gasket and trans filter run $10 to $15 each. You will also need a couple of drain plug gaskets. You cannot replace the pan gasket without draining most of the fluid.