Motivation is a precious thing, but sometimes it's just not present. What can you do about it? Getting tired or even bored is actually a natural thing, happening to everyone.  Everybody feels bored sometimes of working out or keeping a healthy diet. The whole process can become dull and motivation may collapse. Sometimes we feel without energy and don't have a clue how to “re-motivate” ourselves. To treat something usually you have to find the source, which is actually causing the problem and only from that moment on you can start thinking about finding a solution to the “motivation-lack” problem.
It may have several causes. Every one of us has a different life, different jobs, different families, different environment. A problem can be anything from workplace issues till relationship, love-life problems.
A comparison can also make us truly unhappy.  This poisonous way of thinking: “Look what that one did! Look how that one looks like! And here is me... Me... The failure me.” Me who can't keep up eating almost only protein for dinner, me who doesn't go every day to the gym, me who isn't that addicted, focused, rich, loved, me who procrastinates all the time, the Me...the Me..the Me...
You can not change your height, the width of your hip bone or shape of your skull. So, it is not worth thinking about it.

 Also, there might be a cause you can not help, remove from your life at an immediate instance. But whatever it may be, the worse thing you can do to yourself is not to recognize it or to deny it. Whatever it may be, everything, and I mean EVERYTHING can be helped, everything can be adjusted and repaired. The only difference is, that there are things you can correct almost immediately and there are the ones, that require long-term attention, so they can be corrected on the middle or long term. The realistic categorization of your particular goal is utterly important.  The success or failure of its realization can depend on it. 
      What issues can you help and resolve in short terms? Let us see... Diet-train-diet-train... Same place, same time. Same exercises. Let us just forget about our private lives, which undoubtedly are very important in our self-development, but focus a little on the training-feeding process. Let us analyze the problem at the very source.
 Let's say, You are unmotivated in the gym. So, first, we have to analyze if everything really goes perfectly there. If after detailed analysis, you find, that there is no source of dullness there, in that case, you might want to move on and search other parts of your life. But, if you have problems with the training process, it is so easy to change. Maybe you are fed up for example with your trainer, so you might want to change him or her. I actually experienced this problem. A great trainer can make real wonders, instead, one that only counts your repetitions can make you turn away from the gym and in such a case you might find that you are better off alone as with somebody who just forces you to do all the same exercises all over again and counts your reps. Remember, that trainers or any other acquaintance, family member, friend, spouse etc you might have, that is not helping with your development is a person you do not need in your life. I believe this hundred percent, that instead of somebody who doesn't contribute to your success, whatever your goal would be, you are better off alone. People, willingly or not can really pull you back. Eliminate such people from your life or reduce contact as much as possible, if you feel that is the source of your lack of motivation. “Demotivation” does exist and you could well experience that, so get up on your feet and do something about it. 

We are all different. Some people have such strong will, that can not be demotivated by others. They don't care about a lot of things, just go anyway, having a strong will and definite purpose. Some people think a lot and suffer a lot. Compare a lot. This can happen in every single area of your life. Gym, nutrition, love-life, work and whatever the heck we may get ourselves involved in. 
It is unnecessary to tell you to stop thinking and go with the flow, be like the ones who just don't care.  Because there is no such thing as “stop thinking” but I can offer a thought you may want to contemplate on. Just read this, think about it. You want to make a new habit. Not an addiction. And habits are not done 24/7. Addictions are. So, keep away from “flagellating” yourself about your weaknesses. Nobody is perfect, yes, yes, I know you heard that a lot, but I don't care if you did or not. If you read this, it means you still didn't believe it 100%.  
You are you. The other is the other and nobody can change the fact, and nobody leaves Earth alive either, neither will Jennifer Lopez make a photo shoot after having a thanksgiving dinner. Don't have the demand of yourself to change suddenly. Analyze, plan, execute. Oooo, you are surprised that it's taking a few years to execute? You know that Einstein worked more than a decade on the general theory of relativity? After the first eight years, he still couldn't get his equation right? He did not give up. Do you think you could be focused on a goal for a decade and go from one failure to another with no lack of enthusiasm? Answer: YES! You can, I can, everybody can. Because you will analyze your processes, find the wrong, correct and meanwhile you will love the process itself. Remember, that success is only a fragment of a second. It's like an orgasm. Yes, it is great, but it is only the end of another process, which you also enjoyed. Try thinking about every aspect in this way. Embrace your processes, make them suit you, so you can love them, and in that way, success and achievement will also come naturally. Chew on this for a while and have fun meanwhile.