You have been working steadily, and you have decent pages under your belt (or your book) and all of sudden, the writing seems to have weakened, and it happens just when the end is in sight. Fatigue has set in. Writing fatigue.
The truth is you are writing badly. What to do?
Even if you know it is bad, keep going. Get the basic contours of the plot down and keep going. The fact is, that when you have something with which to work it will be enormously liberating. Why? As always, it is the rewriting that makes your work good.
Now and again—but only now and again—in my writing, something spools out that is good. A paragraph. A page. Actually, it is quite rare. It is a myth that good writers just sit down and write well. It is always, always, always the rewriting that brings quality.
So—if it is bad, keep going. You will be in the best position to make it good.