The First Distance Measurement to a Magnetar in Our Galaxy