According to the prosecutor’s office, it's because they're accused of having links to the network of US-based cleric Fethullah Gulen.
Ankara says it was him who orchestrated a 2016 attempted coup.
Those who are facing jailtime include three colonels, eight majors and 10 lieutenants.

Pakistan bombs targets in Afghan cities, minister calls it 'open war'
Hillary Clinton tells panel she has no information on Epstein
US, Ukraine discuss post-war reconstruction as Russia pummels grid
Israeli fire kills three people in Gaza as truce deal staggers
Cuban forces kill 4 exiles who attacked from Florida speedboat