"It takes half an hour to walk there."
I'm a native Chinese speaker, and I still remember the time when I was learning English in primary school. My teacher told me that "it" in this sentence is referring to "to walk there", so this sentence literally means "To walk there takes half an hour."
To walk there - 走路去那儿/走路去那里
takes - 要
half an hour - 半小时
Whenever you see "it" representing a phase later in the sentence, you should replace "it" with that phrase first before translating. For example, "It is interesting to learn Chinese." "It" is referring to "to learn Chinese". So the sentence literally means "To learn Chinese is interesting." And the sentence is translated as 学中文很有趣
Hope this helps!