BUFFALO, N.Y. (WIVB) — Dwaine Gozdziak, 36, of Alden will spend 20 years behind bars for the attempted rape of a child in April 2020.

Gozdziak was caught in the act of trying to have sex with a child on April 3, 2020, in the Town of Alden, according to the Erie County District Attorney’s office.

The 36-year-old was charged with one count of first-degree attempted rape on July 23, 2020.

He was sentenced to a determinate sentence of 20 years in prison followed by 20 years of post-release supervision. He will have to register as a sex offender after his release from behind bars.

Following a sentencing hearing, Gozdziak was adjudicated as a second child sexual assault felony offender. The DA’s office says Gozdziak was convicted when he was 18-years-old of lewd or lascivious battery in Florida for having sex with a 13-year-old victim.

Patrick Ryan is a JANY award-nominated digital producer who has been part of the News 4 team since 2020. See more of his work here and follow him on Twitter.