The only way is cold turkey! Chocolate was my kryptonite for many years. I was absolutely miserable. I was binge eating it sometimes to the point of vomiting, and was very depressed, no confidence, and 3 stone overweight. My relationship ended indirectly because of it. It was my crutch when I was sad, angry, anxious, and I'd stuff it down without enjoying or barely tasting it at all.
I wouldn't recommend this to everyone, so please don't do this, if you can happily and sensibly enjoy chocolate as part of a varied diet. I just never could, I was addicted.
So 15 years ago, i read about a sort of self-hypnosis which really helped. So basically every time you crave chocolate, visualise yourself eating it, really, really picture it. And then imagine a disgusting taste, like the worst taste you can think of. Imagine the smell of it, and then picture some disgusting smell. I did this every time the thought entered my mind for a whole year. It was really really tough, but the temptation gradually faded, and honestly now if someone asked me I would genuinely say the smell of it and the thought of it makes me feel sick.
I still have lots of lovely treats, with lots of other foods, but have maintained a healthy weight same with those treats I can just have a small amount and not keep going and going