You first need to decide which generation chassis you want, T1N (<2007) or NCV3 (2007-present.) The difference is a chassis redesign and engine change, the T1N uses the OM647 I5 engine and the NCV3 uses the OM642 V6 (or an I4 in the new models.) Both models have some proponents as being better/more reliable but in reality they both have their own advantages and weaknesses.
My own preference is for 2007-2008 models because you get the newer NCV3 chassis and if desired you can install an ECU tune that deletes the troublesome EGR and EKAS (swirl valve) emissions systems, and this model range is pre-SCR so no problems with the complicated DEF (diesel exhaust fluid) systems that can also be subject to issues.
But you can over-analyze the 'which year' thing, my advice would be to find the manufacturer and floorplan you like in your budget range, do a proper due-diligence (have the vehicle scanned for any trouble codes, do the usual visual inspection for any problems, leaks, etc.) and then... enjoy and don't look back.