Eating a chocolate occasionally is okay if you eat the right proportion. Same goes with any other food, the proportion matters and determines how much you gain as well as how much you lose weight.
Be wise and consume more of what is actually beneficial to your body because bad health cannot be reversed. It is never too late to start living and maintaining a healthy lifestyle. You just need to make it a priority. Without making health a priority, it is unlikely you will be able to achieve a good health.