How do I change my preferences?

The thought, “I like sweets” has caused me to break protocol several times. I thought it was just the way I was. I’m now realizing that it is a thought and that I have control over my thoughts and that if I change those thoughts, I will change my result. Here’s the problem. When I eat sweets, I like the taste of them. How do I tell myself that I don’t?