The distribution of X-ray sources in the Milky Way