Since every shrine used to be surrounded by a Chinju no Mori, it is often written with a character meaning 'a god's forest,' as opposed to the normal character for forest.
鎮守の森というのは、かつては神社を囲むようにして、必ず存在した森林のことで杜の字をあてることも多い。