Motivation is a strange beast, it's often easier to motivate yourself to do hard things that involve real challenge and discomfort, than it is to do small things that should be much easier.
Compare going out for a run in the rain with not eating chocolate or consistently going to bed a 10 pm. Most athletes I work would find the former straightforward while either of the latter options, not so much. Identifying small but consistent challenges and navigating paths round them is one of the foundation steps in making long lasting changes. Not necessarily because eating fewer biscuits is the critical point in your journey but because if you don't identify how you can manage these small things then it's the small things that will continue to grind away at your motivation.
The problem with rules like "I'm not going to eat chocolate", is that you will crack, and when you crack it's often not a small crack but a chasm that opens up and chocolate gets shovelled like there's not tomorrow (you can substitute booze, late nights, curry or an inverse like "I'm not going to miss a session") .
So what's the solution? This isn't long enough to look at all the different methods of developing new habits and so the most important message is 'don't sweat the small stuff'. Stay positive, keep reminding yourself of the progress you've made and if you still need structure then a 3-rule strategy might be worth trying...
Write a long list of off the different things you'd like to do, but somehow keep missing. Like, "go early morning swimming", "roll and stretch each evening" or "make a healthy packed lunch every day". Write down as many as you can. Then pick 3 and commit to them for a week. At the end of the week pick a different 3. The logic is that rather than constantly trying to maintain goals then getting dispirited when you crack, you reinvent the goals every week and keep focused on moving forward.
What are your 3 things this week?