Getting to your goals and maintaining them is 100% mental. It has little to do with the work out or the food your eating, It has more to do with what you decide to do. Whether that is exercise or eat right or both. An excuse comes from within, not from the bike or the food. I know, I make plenty of them. I was at 227 and at 5'6" I was not feeling good (yoyo'd back up myself). I'm down to 205 and feeling better, but I still struggle with trying to not make excuses. Once this weather turns and my new bike is built I will be hitting it really hard core. I have other goals set. My first century at the end of May isn't going to ride itself. I'm doing 3-4 days a week on the trainer right now and enjoying my keto diet.
You did it before now do it again. You've got this!