Yes, there was a wide scatter of possible positions for it during the flyby, but they were along a line that missed the Earth. In other words they had a pretty good idea of its position in all except one linear dimension. That's how they could have such a large margin of error, and yet also be certain that it will miss Earth.
For an analogy, imagine you are driving along a road that goes past an airport, perhaps one where light aircraft land so you get quite close to it.
You may know that a plane is about to land but not know the time it will land exactly. Then you could predict it could be anywhere between several miles way, or passing just a few hundred meters over your head. But you'd also know it is going to miss you because your road doesn't cross the runway or any part of its flight path - though you don't kjnow where it will be along the flightpath or even if it will follow it exactly.
It's similar except that asteroids don't crash if their engines fail, so there is no chance at all of it hitting Earth.
The latest news is that they think it will miss by 3 million miles (5 million kilometers) - though the 15,000 km is still possible