The Earth’s orbit around the Sun is actually elliptical. It varies from 147 million km to 152 million km. So the measurement of an astronomical unit is just the Earth’s average distance from the Sun. That’s where the more precise measurement of 1 AU to KM (149,598,000 km) comes from.