Anything pre 2011 will be good, personally I would stick with the 05-07 to keep the 5.9.
I say pre 2011 on all diesel trucks really because that is when they started the DPF / DEF bull crap, that is a huge mess. Basically it is fluid you put in the exhaust so that you can't roll coal, then every so often the truck will dump TONS of fuel into the engine going into a regen mode to burn off all the carbon. This not only gets poor fuel economy but over heats the engine. They started DPF in the Cummins in 07.5 (start of the 6.7L), so I would get anything pre 2007 in the Cummins world
The 6.7 so far seems to be a good engine, it has to be a good platform if they kept it through the DEF stage, but we all know the reliability of a 5.9. The way I look at the 5.9 and the 6.7 is like the Ford 7.3 and the 6.0 Powerstrokes. The 7.3 was bulletproof out of the box like the 5.9. The 6.0 was a good engine, it just needed a lot of work like the 6.7.
One huge thing people think is that there is a huge power difference when there really isn't. I test drove a few 5.9's and 1 early 6.7 before I decided on my 6.0 Powerstroke and while the 6.7 gets up and goes quicker, they both have pretty much the same power. The 6.7 gets 25 HP more and 40 ft lbs more. The difference is there is so much in the aftermarket world for the 5.9, and that will make the power output on a 5.9 far surpass a 6.7. The reason there is a big power difference is in the turbo. The 5.9 uses a fixed geometry turbo, whereas the 6.7 uses a variable geometry turbo making acceleration a lot faster.
The 2003-2007 5.9 and 2007.5+ 6.7 both use a high pressure common rail oil system which is great in my opinion, the engines also share a lot of parts, the 6.7 is pretty much based on the 5.9 just modified to be EPA compliant.
The big thing that told me to stay away from the 6.7 was simply the bore stroke and the torque. It made huge torque at low RPM and has a considerably larger stroke (forgot the actual numbers) over the 5.9 which made more cylinder pressure which blew head gaskets.
Basically where the 5.9 wins is having no emission equipment, the fixed geometry turbo is more reliable than the variable geometry turbo, and has more sealing around the cylinders. All this means of course it's not going to have the same feeling of power the 6.7 has. Where the 6.7 wins is in power and having a larger, higher pressure fuel rail. The cons are that they are prone to head gasket failure, and the fact they have all the emissions crap (EGR, DPF, DEF, and SCR).
Long story short, look for a 2003-2007 5.9 Cummins.