Accurate photo-z measurements for X-ray sources are important to construct a large-scale structure map of the Universe in the SRG/eRosita all-sky survey. We investigate machine learning models based on Random Forests to measure probabilistic photo-z of point X-ray sources. We use information about optical counterparts of X-ray sources from 4 photometric surveys (SDSS, Pan-STARRS1, DESI Legacy Imaging Survey, and WISE), take into account Galactic extinction and uncertainties in photometric measurements. The training sample contains ~580000 objects from the SDSS spectral catalog (quasars and galaxies possibly associated with X-ray emission). We test our photo-z models using cross-validation and the Stripe82X sample as a blind test.