Usually when I come up with any story, my mind pictures what it could become before I could even lead up to it. In one sense, this is a good thing. It means all I have to do is lead the story or let the story eventually get to the end goal on its own.
However, some stories that do have an ending in mind never actually get to it, and those stories suffer for it.
Two examples I know of are Fullmetal alchemist, where the creator knew where the story had to go, and she planned it from the beginning, making the story tight and incredible.
Then there's One Piece, where we know the end goal, but how or when it will ever happen in our lifetimes? No idea. The story does seem to be getting closer to a conclusion, but it still feels a ways off. One Piece could in fact keep on going until the creator, Oda, dies. It's really up to him.
Now both stories here are great. But while FMA has its conclusion and just about anyone can pick it up with the goal in sight (around 26 volumes), One Piece is very huge. It would take a lot of time and effort just to catch up (around 80 volumes???). Since One Piece is such a long story, most people would give up. (Reader burn, essentially)
Having an ending when you start off is a good thing, but don't let it bog you down or make your creative ideas suffer for it. Don't think "how can I steer this situation my characters are going through towards this specific ending, even if it might hurt their current characterizations?"
Basically, it's fine to have an ending in mind, but don't make it an anchor. Have it be more like a goal, since goals can change or be altered.