“Their mission set determines the type of training they receive,” Colonel Turner said. She said that units “also receive focused training on their soldier tasks related to the deployment.”

There are roughly 14,000 troops in Afghanistan, a fraction of the 100,000 who were deployed at the height of the war in 2010. As the number of forces has dropped, the Pentagon has wrestled with how to continue fighting the 18-year-old conflict. Four more Special Forces teams were sent to Afghanistan last fall, according to one of the documents obtained by The Times.

But the deaths of Sgt. James G. Johnston, 24, and Specialist Joseph P. Collette, 29, who two current and former officials said were not properly trained to fight alongside the commandos, demonstrated the Pentagon’s struggle to protect rank-and-file troops in counterinsurgency wars while also preparing to confront threats from Russia, China, North Korea and Iran.

The Times viewed reports submitted by six Army bomb disposal units deployed to Afghanistan and Syria from 2017 to 2019. Taken together with a half-dozen other documents, including some written before units arrived in war zones, they portray a need for set training programs for explosive technicians who support Special Operations troops.

Army bomb disposal “doctrine is not set up to enable the direct support from E.O.D. forces to Special Operations forces,” according to one document from 2017. Another, from April 2019, said that “mission success relies upon the quality of predeployment training conducted” between the Special Forces and bomb disposal soldiers.

Before Sergeant Johnston deployed in March — his first mission to Afghanistan — his bomb disposal unit had little to no training with Special Operations troops and was not prepared to work with them, according to a Defense Department official familiar with his death. The official, as with others who provided details to The Times, spoke on the condition of anonymity because he was not authorized to discuss the episode by name.