Painter was originally charged with dangerous driving causing death, to which he pleaded not guilty.
Last month he pleaded guilty to a lesser charge of aggravated careless use of a motor vehicle causing death.
Judge Tompkins said although Painter was breaching the terms of his restricted drivers' license at the time of the crash, he had no alcohol in his system, was not speeding, and had taken responsibility for his actions.
He also said Ms Diedrichs' family had supported Painter since the horrific accident.
"The devastating consequence for all involved was of course Grace's death."
Defence lawyer Jock Blathwayt said the accident was a "tragedy".
"He has had to live with the consequences of his failure to stop at the railway line."
Mr Blathwayt also highlighted the danger of the Wiltons Rd crossing.
"He is not the first person who has not realised a train is approaching."
Ms Diedrich's death was the second to occur at the level crossing after Carterton man Daniel Quin was killed when he drove his ute into the side of a train in May 2002.
Earlier this year KiwiRail spokesman David Miller said the Wiltons Rd crossing was protected by "Stop" and "Railway Crossing" sign combinations and, given the crossing carried fewer than 170 vehicles per day, it was not on KiwiRail's upgrading priority list.
"We do review the risk rating for level crossings, taking into account a range of factors, including the collision history and any recent change in vehicle traffic.
"According to our records, there were no collisions at this crossing in the 10 years prior to last year's incident, and two collisions were recorded in 2002, one of which was fatal."