99.9% chance it's the conductor plate in the transmission, it has the speed sensor and also causes limp mode.
About a $120 DIY including new fluid and filter, easy if you have access to a lift, otherwise plan on spending a lot of messy time on your back.
Transmission Conductor Plate+Connector+Filter+Gasket KIT for Mercedes Benz 722.6 | eBay
6-Liters Mercedes Automatic Transmission Fluid (MB Spec 236.10) | eBay