The girl was going to Thiruvananthapuram for an examination when the incident took place.
Fellow passengers caught the criminal Biju and handed him over to the railway protection force personnel here.
An accused in an earlier case, Biju has been evading police, sources said.