You’re referring to Season 13, Episode 12: “We Build, We Fight” (often misremembered as “Whiskey Tango Foxtrot,” which is S13E11). In this episode, Gibbs is deployed to a remote desert location for a classified sniper mission targeting a high-value terrorist. The episode flashes back to his Marine sniper past and showcases his marksmanship and moral burden.