Where fails the preposition test: nothing nominal follows it directly (where the park collapses; near the park works). Compact roles: question adverb, Where is the station?; relative adverb, the village where I grew up; conjunction, I sat where I could see. Never a preposition.
Where in the wild: one test, three roles
Ask where? and expect a place answer: that is the adverb where. In Where did you go? it questions a place directly, standing at the front of the sentence rather than sitting before a noun like a preposition would.
Where can also ask a place indirectly: I wonder where she lives. The same adverb now introduces a question inside a larger sentence, still pointing to place information.
As a relative adverb, where points back to a place and adds detail: This is the village where I grew up. Notice village names the place; where links to it instead of taking its own noun phrase after it.
As a subordinating conjunction, where introduces a clause about place with no earlier place noun: I sat where I could see the stage. Unlike the relative use, nothing before it refers to the location.
Ambiguous case: I do not know where to go. Here where works with an infinitive, still asking place information, so most references keep it in the adverb family; some grammars treat such strings separately.
A boundary case: clause-initial questions
Boundary case: a direct question puts where first, the very slot prepositions rarely occupy. Test what follows the word. In Where is the station? no noun phrase comes directly after where, so it questions a place as an adverb.
A near-miss sharpens the test: near the station shows a real preposition holding the station after it. Where the station collapses as a phrase. If nothing nominal follows directly, the preposition label does not fit, even clause-initially.
Refine the test for indirect questions. In Tell me where the station is, the noun phrase appears nearby, but it belongs to the verb is, not to where. Judge by what immediately follows the word, not by word order.