What generated the punishment was not the refusal to shoot a little girl, but the fact that he disobeyed a direct order from a superior, which led to the deaths. But I'm not an expert on American military law, so..."you are an ex-military man who made a mistake during a mission"
10 years of prison for NOT killing a small girl? In which army he served? the North Korean one?
An american soldier would not serve 10 years of prison even if he shot down an US helicopter (well, unless he did that intentionally)
Just remember this is just a work of fiction. I've seen much worse justifications in multimillion-budget movies.