Answer: He was hired to train the Japanese army.
At the beginning of the movie, Algren was giving a presentation to a crowd of people and speaking about the war against the Native Americans. After the presentation, he was approached by Sgt. Gant, who told him about a job offer. They went to dinner with their commanding officer, Col. Bagley, and some Japanese businessmen. Algren agreed to accept the job to train the army, provided they pay him $500 a month.