The other friends here provided already several better direct answers. Another one is "to cure", or maybe even "to get rid of".
But "to solve" might be (at the limit) correct if you intend to say:
He tried to solve the root cause / problem / conflict which was determining his addiction to drinking Coca cola.
And obviously, in the original sentence, the focus is on the effects, not on the causes, so this meaning is not applicable at all.
And even then, he was not curing or solving anything, he was replacing one addiction with another addiction.
As one smoking doctor (a friend of mine) one told me (coca cola drinker): "It would be healthier for you to become a smoker, then to be a drinker of coca cola." I do not know if he was right, but an addiction is an addiction: it is a proof that something needs to be solved.