The distance of the planets from the Sun is only one part of what makes their temperature. All planets also have some heat stored inside them. This heat comes from several different causes, but one of the most important is left-over heat from when the planet formed.
Bigger planets have more heat, and it takes longer for bigger planets to cool down.
Since Neptune is much much larger than Pluto, it has a lot more of this heat stored up inside it. But if you were able to send a space probe into Neptune's atmosphere, you would find that it got hotter and hotter as you went deeper and deeper, due to the left-over heat from its formation.