What if an employee tells you that they are being sexually harassed but does not want you to do anything?

You have an affirmative duty to investigate all claims of harassment, once you learn of them. Even if an employee states that they don't want the matter investigated, if you have enough details to investigate, you must do so.

Employers who know of harassment and do nothing can be found liable

You can find more information in the Harassment Investigations section of the HR Library.