The distance to the luminous blue variable HR Carinae