If you ask any writer they will tell you that writing is hard. Thinking up an idea? That's the easy part. I can do that all day, every day. Actually making it a book? That's more in the way of blood, sweat, and tears. There is no button that will put your idea into a book for you. You have to sit down and write it. The process is painfully slow. You don't seems to see any sort of ending for a long time. This tends to breed frustration. Any writer can tell you that frustration can kill the desire to write fast.
Once that frustrations starts creeping in it becomes harder to focus. You become easily distracted by anything and everything. Infomercials become the most fascinating things ever. Avoidance becomes the norm until you look up and you've discovered that you haven't worked on your story in years. This leads to a whole new wave of frustration. It's a viscous cycle that one needs to nip in the bud if they hope to see their books on a display self.
One way to help is to talk to other people that have been their. It is pretty comforting to know that even those that are where you want to be have also had to deal with frustration. Suddenly, you don't feel so alone.
Another thing you can do is take a scheduled break. One where you mark a date for it to end. This way you don't turn around and find that you took a break from your project for two years. Been there and it's never fun realizing how fast time runs from you and it does run.
A break might be necessary to get a better focus on what you want to write. Stepping back can be what you need.
Then there are times that you just need to write through the frustrations. it sucks, but there are times that it just needs to be done. When that is the only option, I suggest a good music playlist with a nice beat to it and power through it.