In that context, it seems like he got in trouble with the law for assaulting someone. When he went before the judge, the judge gave him a choice of doing jail time or joining the military (which, yes – this still happens).
Now, another use of pull and its various forms is to say that you were selected for something or it was your turn for something. (“Man, I pulled latrine duty again.” means “I really do not like the fact that I was selected to clean the bathroom again.”) Pull can also mean that you performed an assigned task. (“I pulled guard duty last night” means “I performed guard duty last night”)