Characterization of vorticity in pygmy resonances and soft-dipole modes with two-nucleon transfer reactions