Sounds to me like maybe your tranny's clutch packs have broken.
My car lost 4th gear the other day, it just would not go into 4th at all.
My mechanic opened the pan, and found lots of clutch pack material from the tranny in the pan, and it was black.
I'm getting it rebuilt so it will be like new again.
Yours may be the clutch pack, or it could be a cable adjustment or a vacuum adjustment or repair.
Someone who is a tech can answer it. I'm not a tech, so the above is just my opinion.
'92 300CE - Sold
2004 C240 - C7 Wheels
2015 ML350 - P1, Pano, Ash poplar wood, Sport Dinamica interior, Running Boards Keyless go.