Distance from the sun has nothing to do with something being a planet or not. Pluto is not considered being a planet because it is too small so we call it a dwarf planet.
Because Pluto has an orbit around the Sun which is very elliptical, there are times when it crosses Neptune's orbit and becomes closer to the Sun than Neptune. For 20 years, from 1979 to 1999, Neptune was actually farther from the sun than Pluto.