For a direct bolt in you want a mid 03 or newer 4l80e from behind a 6.0l. As to which ones will work, any 4l80e or 4l85e from 99+ with the extra mounting bolt at 12 o clock will work so long as you run the correct torque converter. Just keep track of what it came out of in case you need parts for it as there were some changes around 03 iirc.
If you're talking about a GM 6 speed, ot would cost a small fortune to make it work. 06 is a gen 3 truck(24x reluctor), and the 6l80/6l90 only communicate with gen 4 controllers(58x reluctor). It can be made to work, but will set you back some coin to do so.