When Israel entered the land, they were to assemble on two mountains just west of the Jordan and a little south of the half-way point between the Sea of Galilee and the Dead Sea. Half the tribes were to assemble on the northernmost mountain, Ebal, and half on the southernmost, Gerizim. The Levites were to assemble in the valley between.
All three sections had a part to play in a public reading of the blessings and curses of the law. An altar was to be set up and plastered over. On the plaster was to be written the law of the Lord.
In many years to come, a controversy was to arise about where God wanted His people to worship: Mt. Gerizim or Jerusalem? According to Deuteronomy 27, the altar was to be on Mt. Ebal, but in the controversy, that piece of information was conveniently overlooked. Mt. Ebal was where the curses were read. The anti-Jerusalem side opted for Mt. Gerizim, the mount where the blessings were read. This is the controversy the Samaratin woman refers to in John 4.
In point of fact, the place of worship changed several times, from Ebal to Shiloh to, finally, Jerusalem. The commands insisting that Israel only worship at the place of God’s choosing did not confine them to one place forever, only to the place God chose at any given time. God could change His mind.