P0335 is wiring harness problem for crankshaft position sensor, moisture in connector. My W163 Star manual for ML320: Mercedes repair kit A210 540 00 33 should be used to fix P0335 (it's 120mm long pre-wired L5 2-pin CPS connector)
but I believe a simple pin or socket oxidation clening should do the trick. I would disconnect the battery and that should reset all of the faults to let the fuel trim adaptation relearn all settings and see what code will show up again (if any).
1999 ML320 230K miles
2003 Lexus GX470 285K miles
2001 ML320 162K miles
1980 280SE EURO W126 156K miles 142mph top speed SOLD
1984 300D TURBO DIESEL W123 SOLD