The origin of the unusual incubation period distribution in the development of AIDS is largely unresolved. A key factor in understanding the observed distribution of latency periods, as well as the occurrence of infected individuals not developing AIDS at all, is the dynamics of the long–lasting struggle between HIV and the immune system. Using a computer simulation, we study the diversification of viral genomes under mutation and the selective pressure of the immune system. In non–HIV infections, vast spreading of viral genomes in genome space usually does not take place. In the case of an HIV infection, this may occur, as the virus successively weakens the immune system by the depletion of CD4+ cells. In a sequence space framework, this leads to a dynamically induced percolation transition, corresponding to the onset of AIDS. As a result, we obtain a prolonged shape of the incubation period distribution, as well as a finite fraction of non–progressors that do not develop AIDS, comparing well with results from recent clinical research.