I agree that this was probably the right outcome. I don't believe he was a "traitor", as some would have it, particularly in a traditional sense. As you mentioned, his being accepted for military duty, given his mental health issues, should, in a perfect screening process, not have happened. I suspect that the military's current recruiting crisis and the desperation to find acceptable recruits, had something to do with his acceptance for military service. What's more, his actions did not intend to cause harm to his fellow soldiers, and I doubt that their safety or lack thereof ever entered his thoughts. His actions seemed to have been caused by confusion more so than some devious well thought out plan. He has suffered greatly for his mistakes.