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.

Israel launches airstrikes on south Lebanon
Voting ends in first phase of election in India's Bihar
Britain's Prince William calls for optimism on environment at EarthShot Prize event
Afghanistan and Pakistan return to Istanbul for more peace talks
Groping of Mexico's president puts violence against women in spotlight