Same here, stopping to smoke was really easy but my candy addiction is real hard. It's like day and night for me. I struggle and have been struggling in not eating candy for years (or at least a lot less) but I have failed each time.
I think different substances are differently addictive to people.
Sugar is one of the hardest addictions to kick. I've kicked cocaine and alcohol too.. sugar was by far the hardest physically. It's also hard to stay sober because it's so accessible in foods and accepted by society.
With any kind of addiction, it's worth exploring what the triggers are. There might well be some underlying emotional thing that makes you eat fruit.
For me: I eat cookies because my Mom baked a lot, and I lost her early. This is a way to feel close to her. Knowing that makes it easier to not eat all the cookies. That doesn't mean all addictions are rooted in early childhood or psychological symptoms, or that your life gets fixed if you just talk about your parents a lot ;) But especially with addictions that only create mild physical addiction symptoms, it's worth looking at.
I think different substances are differently addictive to people.