I think you have to start by being of legal status.
I think you're right. My bunkie in boot camp (he was top bunk, I was bottom) was a Portuguese immigrant named Figueredo. He joined while being a green card holder--still not a citizen. He said he would be granted citizenship upon successful completion of his term of enlistment, 3 years, I think it was, although he may have signed up for 4, he was just that gung ho. But I think he had to get at least 3 in for the citizenship privilege.
One other bennies of his status: he could quit anytime he wanted without the usual repercussions us natural borns would have encountered. And the D.I.'s never failed to remind him of that fact on an almost daily basis.
What they didn't remind him of, but he was very aware of, is that he would be subject to immediate deportation had he quit.
I seem to recall part of Obama's ExO'd DACA act was to grant citizenship, or maybe legal status, to any dreamer who had served honorably. I could live with that, but I don't like the unconstitutionality of the way the DACA thing came about.
Maybe this guy should apply for dreamer status. I hear they're pretty lax in their qualifications for being a dreamer. He'd probably get in "under the wire", so to speak--as long as he didn't bump an MS-13 gang member out, getting in.