I struggled a lot during my life to exercise regularly because I didn't feel the motivation to do it. Some months ago I realized that I don't actually need to be motivated to do something, I just have to do it.

If that sounds strange, consider that if you think you need to be motivated to exercise, you now have to do two things in order to exercise: first you need to motivate yourself, and then you need to exercise. Isn't it just better to skip the first one?

Of course sometimes you are not motivated for other reasons: maybe you don't like your work, or it feels pointless to do something; in these cases a deep reflection on those issues is needed.

On the other hand for exercising you don't need to be motivated: exercising is difficult since it challenges your body to do more than what it can normally stand; this is what then gives the muscles the signal they have to grow. It is ok not to be motivated to perform hard work, but you still have to do it for your health and well-being.

Moreover, after working out you usually have a better mood and generally feel much better than before, which should be a motivation of sort: I don't feel like doing it now but I know that later I will feel much better, so I better do it.