A characterization of the ellipsoid through the torsion problem