The closest major galaxy to the Milky Way is the Andromeda Galaxy, also known as M31. It's about 2.5 million light-years away.
While there are some smaller galaxies that are closer, like the Large and Small Magellanic Clouds, they are considered satellite galaxies of the Milky Way, not independent galaxies like Andromeda.