Cutting refined sugary sweet foods out of my diet kills my cravings. I eat a diet specifically designed to combat food cravings/addiction.
If I need something sweet, I'll chew a piece of gum. A craving only lasts two minutes. If you can get through the two minutes victory will be yours.
Sometimes, if desperate, I will make a "milkshake" out of chocolate whey protein, a banana, some ice, and almond milk. That works pretty good. It feels like a decadent, frozen treat.