If the transmission's shifts are appropriate to the driver's demands the
problem arises from insufficient air or fuel into the motor,
turbocharger failure or possibly a blocked (or pinched shut) exhaust
line. Also, don't exclude bad fuel or gasoline in the fuel.
A dirty air or fuel filter would show itself to be so on acceleration
and long hill climbs both of which require lots of air and fuel.
Generally, diesels' fuel injection systems are designed for constant
speed use so a means to add fuel for brisk acceleration is needed for
automotive applications. In older M-B diesels this is done by monitoring
the turbocharger's boost pressure and adding fuel as the boost pressure
rises. Such system's malfunction can be caused by no turbo boost, sensor
failure, a blocked or broken plastic transmission line etc.. Your modern
diesel is more complex and have issues beyond those described here.
If the car was driven over curb or stone the exhaust pipe could have
been crushed shut, choking the motor.
Those are what generally comes to mind, hope it helps find the cause.