If a virtual knot diagram can be transformed to another virtual one by a finite sequence of crossing changes, Reidemeister moves and virtual moves then the two virtual knot diagrams are said to be homotopic. There are infinitely many homotopy classes of virtual knot diagrams. We give necessary conditions by using polynomial invariants of virtual knots for two virtual knots to be homotopic. For a sequence S of crossing changes, Reidemeister moves and virtual moves between two homotopic virtual knot diagrams, we give a lower bound for the number of crossing changes in S by using the affine index polynomial introduced in [13]. In [10], the first author gave the q-polynomial of a virtual knot diagram to find Reidemeister moves of virtually isotopic virtual knot diagrams. We find how to apply Reidemeister moves by using the q-polynomial to show homotopy of two virtual knot diagrams.