The Great Wall of China was not constructed all at once. Much of what we now know as the Great Wall of China was built over a thousand years after the project was begun.
The project was begun in 221 BCE. That wall was built during the rule of China's first emperor and was made mostly of earth. The elaborate stone wall that we know today was not built until the 1400s CE. There were parts of the wall that were built at various points in between. Thus, the Great Wall of China was not built all at once but was built at different times over a period of about 15 centuries.