Writing a dissertation (or other long project) requires a concerted effort. And unless you are willing to commit to that effort it will not get done.
The world will present obstacles. The world will present distractions. The world may well present some terrible fate that prevents your completing your dissertation. There are many, many reasons for not finishing.
There is only one reason that people finish: they committed to doing the work. Ultimately it all depends on you. And that means making choices. If your life is full of other commitments, then you will need to find a way to make it happen. You must feel that the writing project is part of your purpose.
It is possible to write extended works by finding nooks and crannies of unoccupied time. But not if those nooks and crannies aren't regular and frequent. Writing is about working out our ideas. We can work on ideas when we're doing many other things. Sure, we may not have quite the same concentration, but if we are thinking about an idea, even in the back of our minds, we can gain insight in time. Of course this presumes that we can also find a moment to write down ideas after they come to us.
I have worked with writers who, week after week, always have a reason that they are not writing. "Spend fifteen minutes a day," I say. "I don't have time," they say. Fifteen minutes! If your dissertation is important to you--really important to what you want to accomplish in your life--isn't it necessary to make the commitment?
Of course, it's often the case that people might avoid that fifteen minutes because of doubts in their abilities. But this, too, depends on making a commitment to it.