The Czech sentence means "We used to go there for nine years.; We went to that school for nine years."
While your translation is technically correct, it would never be said like that in Czech as it implies that you walk around somewhere without taking a single break for 9 years. That's a lot of kilometers without sleeping. (Chodili jsme tam do večera. - "We walked there until the evening." would work.)
If you were to say for example that you walked all the way to Korea and the journey took you 9 years, you'd say "Šli jsme do Koreje devět let."