01-02 = Early LB7 - These are the first generation of Duramax. They have known poor injectors which fail once or twice throughout the life of the engine. They sometimes blow head gaskets to combustion but its not a huge issue. The early LB7 has a more simplistic control system. These run an Allison 5 speed Automatic or ZF6-650 6 speed manual transmission
03-04 = Late LB7 - These are physically the same engine as the early LB7s, but they have an updated and improved control system with a new PCM and better serial communications support. It was updated to interface with the new interior and wiring in the 03s. These also run an Allison 5 speed Automatic or ZF6-650 6 speed manual transmission
04.5-05 = Early LLY - These are the 2nd generation of Duramax. There were changes made to the injectors among other physical engine changes. These engines are known to run hot and blow head gaskets on a regular basis. I'd avoid these years. Like the LB7s, these run an Allison 5 speed Automatic or ZF6-650 6 speed manual transmission
06= Late LLY - These are the 3rd generation of Duramax. The engine was drastically changed with new injectors, heads, a variable pitch turbo and significant bottom end upgrades and updates. These are solid engines and come with an updated Allison 6 speed Automatic or ZF6-650 6 speed manual transmission like the first two generations.
07 = LBZ - These engines are physically identical to the 06 LLY but they have a different tune in them which added significant power. These also run the new 6 speed Allison transmission but the ZF6-650 6 speed manual transmission was no longer offered as an option. These are widely regarded as the most desirable Duramax engine even up until today and these trucks and loose engines command a surprising premium in purchase price.
08-10 = LMM - These engines are physically the same as the 06.5 - 07 LLY and LBZ engines, but they have some significant changes in the engine control systems and introduced the new diesel particulate filter emissions systems. They still run the 6 speed Allison but they upgraded to a new PCM which runs canbus high speed networking vs the old low speed serial networking of the previous years. They run a new type of throttle pedal which is not interchangeable with the older vehicles as well as a new transmission control module. These are more work to run in a swap than the LBZ or older engines due to the large amount of information being passed over the serial network vs using analog signals but they can be made to run stand alone relatively easily instrumentation concerns aside.
11-15 = LML - This is the 4th and latest generation of the Duramax which again saw huge changes in the engine including an all new high voltage (50kV) peizo-electric common rail injection system, new turbo, heads and intake systems. These engines again have significant changes in the control systems and also saw the introduction of the selective catalyst reduction system which requires the use of urea. These engines have PCMs which are highly locked down and even to this day they are difficult to tune or modify. They simply do not contain the hardware required to download their tuning to modify. EFIlive has allowed us to load tunes in (albeit slowly...) but you have to use a base tune taken from another truck where someone has physically disassembled their PCM to rip the tune off the memory banks in the PCM using $10K+ software and hardware. This can cause problems if their tune isn't a perfect match to your truck. EFIlive also does not offer any ability to disable emissions systems. H&S had a tuner suite and the capability to delete emissions systems but they were muscled out of business by the EPA and no longer exist. I snagged a mini-max and delete tunes for my 2014 2500HD before they went belly up so I can delete the emissions systems from my truck when they fail outside of warantee. It's not a matter of if they'll fail, it's when. And the repair costs are $5K+. Best I know there is no way to make these engines run stand-alone and they are not viable for a swap.
I am personally running an 03 engine with an 02 control system in Penny. The first gen control system has a lot more analog signals than the later systems do which all interface nicely with the Tahoe's stock instrumentation. I am very happy with the engine and the swap. It makes plenty of power with just a simple tune (300hp / 650ftlbs to the rear wheels on 37s).
My next rig I intend run an 06.5-07 LLY or LBZ with the 0.6.5-07 control system and an 6 speed manual transmission tune updated with the 07 LBZ tuning to step the power up to 07 levels. My next rig will be an 03-07 4 door Tahoe or Yukon so the newer engine's serial communications will play nicely with the instrumentation and other truck systems.