Lizo - I have an example from my own work that might help you as I always write with an ending in place.
Now, a word of warning. I am a panster and write the story my characters show me as they deal with their issues. My end, as I refer to it, is the climax of the book, the paramount scene where they either rise to the occasion or fail to achieve their goal. There are some pages after that point, resolving the minor snares resulting from what happened, closing the work, but by and large I consider that climactic scene the end when I start.
When I begin I have only my beginning point and my ending point (and the beginning is extremely flexible because I haven't gotten a feel for the story yet). At the beginning, I know exactly how I want the book to end, I know how it's going to happen, but I have no steps in between.
Sometimes, my characters lead me in directions I wasn't expecting. Sometimes, they do things I never saw coming, show me sides of themselves I didn't intend them to have (and some are not very good). I go with it, let them keep those traits and move toward their goal and the end I set up before hand and when I reach that point.
Sometimes, the end I originally planned and knew to the smallest detail, can no longer be written the way I wanted, whether it be because my characters changed enough on their journey to do what I intended, whether it be because a sub plot that appeared twenty five percent of the way in makes that end no longer . . . perfect, but the bones of that ending are strong, and I can use those to craft a new one that better fits the book I wrote.
Using my first completed novel as an example, I had my antagonist get out fought and killed by my protagonist using the last ounce of his strength. When I went back to revise, I said, how can I make this better, stronger, more gripping (ie, how can I raise the stakes) and I looked at the bones of my ending (good guy kills bad guy, good guy's in pretty bad shape but alive), and altered the path of the ending.
It no longer made sense for my protagonist to out fight my antagonist (I'd built a villian too dangerous and hero with not nearly enough training to match him toe to toe), but I'd also built a hero who was gritty, and determined, and willing to drag himself over broken glass to reach his goals.
Now, my hero is outfought (almost tragically so) and only that grit he gained through his trials up to this point keeps him alive beyond the first minute. He is battered and broken and bloodied by the villian to the point where hope is nothing more than a candle flickering in a hurricane . . . and he finds a way to win using the qualities he revealed to me.
In the end, my hero wins and my villian dies, they fight in the same location, with the same tools they had in my original end, but there is little about their fight that matches. The bones were strong though, and I achieved the end I set out to (hero victorious, villian dead) but the writing of the two endings are vastly different.