The 11-year and 22-year modulation of galactic cosmic rays (GCRs) in the inner heliosphere are studied using a numerical model developed by Qin and Shen in 2017. Based on the numerical solutions of Parker's transport equations, the model incorporates a modified Parker heliospheric magnetic field, a locally static time delayed heliosphere, and a time-dependent diffusion coefficients model in which an analytical expression of the variation of magnetic turbulence magnitude throughout the inner heliosphere is applied.Furthermore, during solar maximum, the solar magnetic polarity is determined randomly with the possibility of A > 0 decided by the percentage of the north solar polar magnetic field being outward and the south solar polar magnetic field being inward. The computed results are compared with several GCR observations, e.g., IMP 8, SOHO/EPHIN, Ulysses, Voyager 1 & 2, at various energies and show good agreement.It is shown that our model has successfully reproduced the 11-year and 22-year modulation cycles.