Although I know that now you are very stressed, you may be able to help your son never do it again (because if he did it once, he is capable of it) by having him focus on the victim and of how scared he probably was. What if somebody had done to your son what your son did to this teen? I think it is mandatory for our adult kids to have empathy in order for them to get better. It isn't your son's friends fault...feel like I'm repeating myself. There are other kids on the street and most are not violent, gun-toting criminals, but he went along with this man. I hope your son comes to realize what he did, more than worrying only about his own skin. And, WM, one day I hope you think about it too.Neither he nor you have addressed sorrow for the victim. That is not criticism. I'm more puzzled than anything. For me, the first thing I'd think, after bursting into tears, would be, "OMG! That poor kid! What on earth did my son do to him? HOW could he do that to him? I hope he's ok." Then I'd worry about what the charges meant, butg the victim would be on my mind. Anytime my oldest son hurt somebody, and he never hurt anyone the same way yours did, all I could think about was, "What kind of person is he that he does this?" When he was little I tried a zillion therapists to try to stop his angry aggression because it appalled me.
Our adult kids who lack a conscience are the ons that tend to keep getting into trouble over and over again. The ones who are capable of taking responsibility and feeling remorse have a much better chance of seeing what they did as very wrong and changing.
Don't make this just about your son and his plight. If it were me, I KNOW I'd be talking to my son about his victim, A LOT. It would mean more to me than just getting him off the easiest I could (not sure I'd do that). But maybe I would. Even so, that victim would be in my thoughts and prayers and I may even have apologized to the family, although I was not the one who did it. If your son is only sad and scared because of himself, that isn't going to make him change his ways once he is sprung.
I'm not sure you can teach empathy, but since you have him talking to him about God, well, in my opinion it's a good time to bring up that he terrified and hurt a minor teenager and that the teen may still be having nightmares over the attack. If my son or daughter had EVER perped in any way on another person, they would have to express remorse to me and a willingness to try to make amends in order to have my support. This is probably just my opinion, but since your son has never once expressed any concern for anyone except himself, if it were me, I'd be worried that he doesn't see the big picture and that other people were hurt by his actions. And I don't care if he didn't break the boy's leg or if the "friend" was more violent. There are plenty of others like this "friend" for you son to find if he doesn't understand that no matter what or how sorry you feel for yourself, you do not hurt other people. My own son's lack of empathy is what scares me the most about him.
Getting your son a mild sentence is not the end of his story. In fact, it could be just the beginning if he fails to see that hurting others is a horrible way to behave and NOT blame anyone else for what he did. And I doubt, if there's a next time, if he'll get any breaks at all.
You probably won't read this as it is not about jail/prison, but I felt compelled to set it down. Ignore it if you like

Still with you, holding your hand, hoping for the best for everyone