Planetary nebula distances in Gaia DR2