Do you see the mistake? "Though the light from the nearest galaxy takes about 3 million years to reach Earth..."
Do you see the mistake now? The mistake is the word 'nearest'. The nearest LARGE galaxy to us is the Andromeda Galaxy, located about 2.5 million light years away. Light from Andromeda takes 2.5 million years to reach us, so rounding up, approximately 3 million light years. The problem is that Andromeda is by no means the closest galaxy to us. The Andromeda Galaxy is part of the Local Group, the group of galaxies we belong to, but there are several others closer than Andromeda.
According to the list of nearest galaxies on Wikipedia, the Andromeda Galaxy comes in around #38. Wow! So no, not the nearest galaxy. Close, yes, but not the closest. Had this article included the word 'large' before the word 'nearest' it would be correct. What a difference a single word makes!