The incident took place on November 29 when the girl was on her way to Delhi from Allahabad. The incident occurred in S-8 coach of the train.
Police said Army personnel Amit Kumar Rai posted at Danapur, Patna and Tapesh Kumar at Buxar in Bihar, allegedly tried to molest her and beat her up when she resisted.
Later, some co-passengers came to her rescue when she raised an alarm.
"I was travelling in Magadh Express. The jawans tortured me mentally and physically and even threatened to kill me," she said.
"I somehow saved my life," she told reporters later.
The girl reported the incident to Government Railway Police in Etawah railway station and a case was registered under the Indian Penal Code or IPC Section 354 (assault or criminal force to woman with intent to outrage her modesty) against the accused.
Both jawans were later arrested.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)