(1) A person is guilty of custodial sexual misconduct in the second degree when the person has sexual contact with another person:
(i) The victim is a resident of a state, county, or city adult or juvenile correctional facility, including but not limited to jails, prisons, detention centers, or work release facilities, or is under correctional supervision; and
(ii) The perpetrator is an employee or contract personnel of a correctional agency and the perpetrator has, or the victim reasonably believes the perpetrator has, the ability to influence the terms, conditions, length, or fact of incarceration or correctional supervision; or
(b) When the victim is being detained, under arrest, or in the custody of a law enforcement officer and the perpetrator is a law enforcement officer.
(2) Consent of the victim is not a defense to a prosecution under this section.
(3) Custodial sexual misconduct in the second degree is a gross misdemeanor.