1. It is only five minutes' walk.

(What does 'it' mean?)

2. The bakery is five minutes' walk.
(Is it correct?)

1 - I imagine "it" is referring to whatever the destination is, the place to which someone is walking.

2 - yes, correct.

In your first sentence, "it" refers to a place that has been mentioned before, probably in the preceding sentence.

Example:

You'll like food at Hee-Jin's Kitchen Restaurant. It is only a five-minutes' walk.

In that sentence "it" refers to "Hee-Jin's Kitchen Restaurant.

For both sentences, we usually use the article "a" before "five-minutes' walk."

The bakery is a five-minutes' walk.

1. In the sentence "It is only five minutes' walk," the pronoun 'it' is referring to a specific location or destination that is being discussed in the context of the conversation. Without further information, it is difficult to determine the exact meaning of 'it' in this sentence. You would need to provide more context or information to identify what 'it' is referring to.

2. The sentence "The bakery is five minutes' walk" is grammatically correct. It means that the bakery is reachable by walking for a duration of five minutes. This phrase is commonly used to give an estimate of the walking distance to a particular place.