2001-2004 = LB7, Arguably the best Dmax. Has no EGR (unless in California) or VVT. Injectors are prone to failure, but GM warranties them to 200,000mi. I think the 2001s had some issues with the heads as well.
2004.5-2006 = LLY, EGR and VVT introduced, Had problems with overheating when towing heavily, but there is a fix
2006.5-2007 = LBZ, A touch different design, supposedly stronger but some motors have trouble with cracked pistons
2007.5-Present = LMM, DPF introduced, new body style