Judge Rajesh Bhardwaj also slapped a fine of Rs 5,000 on Sachin Kumar.
In her complaint to the Shamli Police Station, the 30- year-old woman had claimed that she had become friends with Kumar after a "missed call", government lawyer Qayyum Ali said.
She had alleged that she was raped on February 3, 5 and 7 in 2013 at different places and that he later refused to marry her, he said.
The jawan is posted in Himachal Pradesh's Shimla district and is from Uttar Pradesh's Baghpat district.