The army sergeant who left his post and was captured by extremist forces is being charged with desertion and endangering his unit.