The distances between planets will vary depending on where each planet is in its orbit around the Sun. Sometimes the distances will be closer and other times they will be farther away.
The reason for this is that the planets have elliptical orbits and none of them are perfect circles. As an example, the distance between the planet Mercury and Earth can range from 77 million km at the closest point, to as far as 222 million km at the farthest. There is a huge amount of different in the distances between the planets depending on their position on their orbit path