Involved in the biosynthesis of the O-methyl phosphoramidate (MeOPN) group found on the capsular polysaccharide (CPS) of C.jejuni (PubMed:17675288). Catalyzes the ATP-dependent phosphorylation of the amide nitrogen of L-glutamine to form L-glutamine phosphate, the first committed step in MeOPN biosynthesis (PubMed:28650156, PubMed:30142271). Catalyzes also the phosphorylation of D-glutamine, gamma-L-glutamyl hydroxamate, gamma-L-glutamyl-hydrazide and beta-L-aspartyl hydroxamate (PubMed:30142271). Does not phosphorylate L-glutamate or L-asparagine (PubMed:28650156, PubMed:30142271). Does not act on L-glutamine derivatives with removed alpha-amino or alpha-carboxy groups (PubMed:30142271). ATP + H2O + L-glutamine = AMP + 2 H(+) + N(5)-phospho-L-glutamine + phosphate kcat is 2.5 sec(-1) with L-glutamine as substrate (PubMed:28650156, PubMed:30142271). kcat is 1.5 sec(-1) with D-glutamine as substrate. kcat is 2.1 sec(-1) with gamma-L-glutamyl hydroxamate as substrate. kcat is 0.41 sec(-1) with gamma-L-glutamyl-hydrazide as substrate (PubMed:30142271). Capsule biogenesis; capsule polysaccharide biosynthesis. Contains an N-terminal ATP-grasp domain, a specialized central substrate-binding domain for L-glutamine and a C-terminal phospho-histidine domain. Mutant does not express the MeOPN CPS modification. The reaction mechanism comprises three steps. First, a histidine residue of the enzyme attacks ATP at the beta-phosphoryl group to form AMP and a pyrophosphorylated enzyme intermediate. Next, the pyrophosphorylated enzyme intermediate is hydrolyzed to generate inorganic phosphate and a phosphorylated enzyme intermediate. Finally, the phosphorylated enzyme intermediate transfers the phosphate to the amide nitrogen of the acceptor substrate L-glutamine. In this mechanism, the gamma-phosphoryl group of ATP is converted to phosphate and the beta-phosphoryl group is utilized in the phosphorylation of L-glutamine.