I'm going to tell a coworker I don't find him attractive
Why do you want to tell a coworker that?
I just want to be honest with him because he was whining about me ignoring him.
It might not be best to tell your coworker that. If he is making advances to you and doesn't stop, you should tell a supervisor or your HR department.
Confessing to a coworker that I think they are ugly isn't gentle.
It's okay to set boundaries with your coworker and tell them you aren't attracted to them to stop their advances. If they don't listen, you should discuss it with a supervisor.