The problem you’re trying to solve is your consistency and your discipline. Motivation isn’t going to keep you consistent or disciplined. They’re on entirely opposite ends of the spectrum. Instead, create a habit. Do you fail to fill up the gas tank in your car because you don’t have the motivation? No. You fill it up because you know it has to be done. Don’t have your level of motivation or desire be what determines whether or not you go to the gym or stick with your diet. Instead, exercise discipline so you can stay consistent. Motivation to change must ultimately come from you. No-one can force you to change the direction you’re heading in, and no-one’s going to come along and kick your arse into shape. It is up to you.
The best thing you can do is to stop thinking that “motivation” is going to be what gets you results. Trying to sustain going to the gym or changing your diet with motivation is like trying to warm your house with a firecracker. It’ll give you a short burst of energy and then nothing. Motivation is something you use to push through that last rep you’re struggling with, not for sticking with a new practice. Thinking of this in terms of motivation is why you have failed in the past.