It's, I think, sort of true that the Civil War wasn't always going to necessarily mean the end of slavery if the north won.
It started as a war to keep the union together, and initially a lot of people in the north thought that it would end quickly and that the states would return to the union and give up their rebellion.
However, as time went on and the losses started to pile up, it became clear to Lincoln and the other northern leaders that a war with this much bloodshed must end the slavery debate for good. That is why Lincoln ultimately wrote and delivered the Emancipation Proclamation.
But it's a point that's splitting a lot of hairs and very nuanced, because the Civil War started when pro-slavery states seceded from the union because they were afraid that a president elected without consent from any of the southern states might move to eliminate slavery...so summarily, the Civil War was definitely about slavery from beginning to end.