On the distance to the Chamaeleon I and II associations