The section of 922 you posted deals with GOVERNMENT military. Not the civilian "unorganized" militia.
922(o)(A)(2) deals with an agent of a state. The poster told me that he's a militia member -- a member of a well regulated state militia may purchase an M4 under 922(o)(A)(2).
It's illegal for civilians to acquire M4's.