Those millions of undead bodies are scattered across hundreds of millions of square miles. So the likely hood of a million on your wall is remote. It's not like they are capable of organization. Not to mention that decay would leave only skeletons after a few months exposed to the weather.
In reality, a medieval style castle with stone walls and moat would be a formidable stronghold against the Zs assuming you had plenty of ammunition.
An island would work pretty well and not require energy or time to build.