Catalysis of the reaction: 4-amino-5-hydroxymethyl-2-methylpyrimidine + ATP = 4-amino-2-methyl-5-phosphomethylpyrimidine + ADP + 2 H+.
ATP:4-amino-5-hydroxymethyl-2-methylpyrimidine 5-phosphotransferase activity