The Deed Of Paksenarrion by Elizabeth Moon

A stubborn, principled young woman abandons her rural life to become a soldier, enduring brutal training, battlefield horror, and the politics of mercenary life as she grows into a leader. Confronting both human treachery and mounting supernatural threats, her unshakable sense of duty, moral clarity, and evolving spiritual convictions force choices that determine the fate of the realm.