The Rangers announced on Wednesday that restricted free- agent forward J.T. Miller has agreed to a new contract.

It’s a two-year deal averaging $2.75 million per season, according to a source.

Miller, 23, played in 82 games this past season and had 22 goals and 22 assists. Miller had career highs in goals, assists, points, game-winning goals (five) and plus/minus rating.

The Rangers have about $9.4 million in cap space for restricted free agents Chris Kreider, Kevin Hayes and Dylan McIlrath.