  Aims: We aim to develop a method to determine distances to molecular clouds
using JHK near-infrared photometry. Methods: The method is based on a technique
that aids spectral classification of stars lying towards the fields containing
the clouds into main sequence and giants. In this technique, the observed (J-H)
and (H-K_s) colours are dereddened simultaneously using trial values of A V and
a normal interstellar extinction law. The best fit of the dereddened colours to
the intrinsic colours giving a minimum value of Chi^2 then yields the
corresponding spectral type and A_V for the star. The main sequence stars, thus
classified, are then utilized in an A V versus distance plot to bracket the
cloud distances. Results: We applied the method to four clouds, L1517,
Chamaeleon I, Lupus 3 and NGC 7023 and estimated their distances as 167+-30,
151+-28, 157+-29 and 408+-76 pc respectively, which are in good agreement with
the previous distance estimations available in the literature
