If its when you just start it, it could be the exhaust.
Duramaxes usually dont tick until they start to get broken in, bing that you have an 09 i doubt you have enough miles yet.
Check the clamp where the downpipe meets the front pipe.
The npoise you could also be hearing could be a broken downpipe bracket or the exhaust hanger that is on the side of the transmission couldve fallen apart. These are very common and are usually only noticeable when first starting the truck.