  We have used the Green Bank Telescope to measure HI absorption against the
anomalous X-ray pulsar XTE J1810-197. Assuming a flat rotation curve, we find
that XTE J1810-197 is located at a distance of 3.4(+0.5,-0.7) kpc. For a
rotation curve that incorporates a model of the Galactic bar, we obtain a
distance of 4.0(+0.3,-0.8) kpc. Using a rotation curve that incorporates a
model of the Galactic bar and the spiral arms of the Galaxy, the distance is
3.7(+/-0.6) kpc. These values are consistent with the distance to XTE J1810-197
of about 3.3 kpc derived from its dispersion measure, and estimates of 2-5 kpc
obtained from fits to its X-ray spectra. Overall, we determine that XTE
J1810-197 is located at a distance of 3.5(+/-0.5) kpc, possibly not far in
front of the infrared dark cloud G10.74-0.13. We also used the GBT in an
attempt to measure absorption in the OH 1612, 1665, 1667, and 1720 MHz lines
against XTE J1810-197. We were unsuccessful in this, mainly because of its
declining radio flux density. Analysis of HI 21 cm, OH, and CO(2-1) emission
toward XTE J1810-197 allows us to place a lower limit of $N_{\rm H} \ga 4.6
\times 10^{21}$ cm$^{-2}$ on the non-ionized hydrogen column density to
\magnetar, consistent with estimates obtained from fits to its X-ray spectra.
