Interstellar extinction and the distribution of stellar populations in the direction of the ultra-deep Chandra Galactic field