In the 1780s William Herschel observed all of the stars around our solar system and determined their distances. From this, he determined that we were at the center of the galaxy, as stellar density seemed to be homogeneous throughout the sky. Unfortunately, Herschel didn't realize that there was a large cloud of dark dust blocking our view of the center of the galaxy. Once infrared and radio astronomy became available, scientists in the 1960s penetrated this cloud and saw a slew of stars at the galactic center.
The distance to the galactic center was determined mostly by use of Cepheid variable stars, through the work of R.J.Trumpler:
Cepheid variable - Wikipediawhich are a "standard candle" for astronomy. To summarize this article, cepheid variables have a specific periodicity to their variance in luminosity, and by determining the period of a Cepheid variable, astronomers determine its suspected luminosity. Since luminosity correlates with distance, one can determine the distance to a Cepheid variable through this method.
Trumpler used Cepheid variable stars to determine the distance to globular clusters surrounding the galaxy and saw that they weren't distributed in the pattern we would expect if we were at the center of the galaxy, but were consistent with being off the center.
Later work with other wavelengths of life confirmed this.