Measuring the Hubble constant with Type Ia supernovae as near-infrared standard candles