"blízko jezera" is possible, although will be more common for a location. "Jsem blízka jezera." - "I am near the lake.".
"blízko k jezeru" is literally "close to the lake" meaning a movement. To get close to the lake. Dostat se blízko k jezeru. This is used quite generally, not just for movement verbs although it is pretty common with them. You can also just "být blízko něčemu", although I like the genitive more. Also in the "mít blízko k někomu/něčemu" idiom (have a close relation to something or someone).
"Jak jsi se dostal tak blízko jezera?" is more about the location. How did you get to the location so close to the lake?
Comparing the actual collocations in the corpus https://kontext.korpus.cz/view?q=~D9t1O9HAPsK1 https://kontext.korpus.cz/view?q=~q5htRy7kFeuL might be instructive. I do not know if the links survive for too long, though.