Is this a clicking sound or a harsh grinding sound you are hearing? They call the grinding sound flywheel milling. Do you have a rear starter support bracket in place? A few notes I found on the subject.
Quite the common problem that stems from the high compression
engine stopping in one of four spots when turned off. These four spots show excess wear on the few teeth of the ring gear where the starter hits it. Usually there are five or six teeth that show wear, chipping, grinding, etc., marks.
The correction is to remove the
transmission, just back far enough to get a breaker bar/long handled wrench in there to remove the flexplate to
crankshaft bolts. Replace the flexplate, loc-tite blue on the bolts.
I'd replace the starter drive at the same time as those teeth will probably show some wear, chipping as well. Use a good quality starter drive. I buy nothing but AC Delco. Be sure the
starter bolts are the correct size for the diesel starter (not the same as a gas engine bolt). Get them snug and install the nose brace on the front of the starter that bolts to the block. It's an absolute must-have item unless you want broken starter bolts. If the brace isn't there, buy, beg, borrow or fabricate one!
The starter bolts are metric M10 1.5 Buy GM ones they are still available. The flex-plate is less then $50. you can replace the flex-plate by sliding the transmission back some 4" grade 8 - 3/8" bolts. That saves the hassle of removing the transmission. You will need to dis-connect everything just like you are removing it. But not remove it. Much easier and 1 man can do it in a few hours.
My guess is if the teeth on the starter are getting chewed up you have flex-plate issues. Shims are something I have not had to use. Most starters are embossed No Shim. If you do use shims use un-slotted shims. Make sure you have GM bolts with the hatch marks and a good starter support bracket in place and tight. The bolt hole in the block at the starter support is also metric M8 1.25. I hope this is helpful. I know how it is to have these issues. I bought a few trucks extra cheap because of the re occurring issue. Good Luck and report back. Happy to help.