Answer :
A senator has a six-year term. Since he was elected in 2012, his term will expire in 2018. Therefore the election would be in 2018.
According to the United States Constitution every six years there are elections to vote for a new senator. Thus, the Democrat senator of Montana, Jon Tester, would need to wait until 2018 to run again for senator. As a matter of fact, he ran in the 2018 election and he won with a total of 50.3% of the votes (253,876 votes), while his opponent, Matt Rosendale, only got 46.8% of the votes.