That answer is incrediblely misleading in its conclusion.
"But, how does the missile know how close to the target it is?”
It does not need to know that. The missile only needs to know in which direction to go, and then it keeps going, and going, and going, until it either hits the target or...