Detective Constable Esther Hodson, who led the investigation for Derbyshire Police, said: "This was a truly horrifying incident where Jinks saw this woman, followed her and waited for his moment to attack her.
Paul Jinks was captured prowling through the dark streets to follow the victim, who was walking home from a night out.
Jinks then sexually assaulted her and attempted to rape the woman, who managed to cry out for help - alerting a nearby home.
Jinks has now been jailed for eight years and nine months with an extended licence period of six years after he admitted attempted rape.
"She bravely tried to fight him off and thankfully when her screams were heard by people living nearby, Jinks was stopped in the act and fled the area.