Invariant distributions and X-ray transform for Anosov flows