I tried searching for an answer but I'm not sure what the underlying concept is and thus am not having much luck with my searches.
Both are grammatically correct, but the first is more idiomatic. English usually puts prepositional phrases (to your goal) at the end of sentences. This rule especially applies when using possessive pronouns (your): it's best to introduce the subject (you) first before we start making references to them (your goal).
The easy way to find the correct order in a question is to turn it into a statement:
You are very close to your goal.
Subj Verb Preposition
How close are you to your goal?
Question words Verb Subj Preposition
Edit: I want to add that both sound right to me. A grammatician would probably prefer the first option, but the difference is so slight that I wouldn't worry about it.