The correct preposition to use in the sentence is "for."
"I go for a walk in the garden."
In this context, "for" is used to indicate the purpose or reason for going to the garden, which is to take a walk. Therefore, "for" is the appropriate preposition to use in this sentence.