Residue-residue distance information is useful for predicting the tertiary structures of protein monomers or the quaternary structures of protein complexes. Many deep learning methods have been developed to predict intra-chain residue-residue distances of monomers accurately, but very few methods can accurately predict inter-chain residue-residue distances of protein complexes. We develop a new deep learning method CDPred (i.e., Complex Distance Prediction) based on the 2D attention-powered residual network architecture to address the gap. CDPred predicts the inter-chain distance maps of dimers (homodimers or heterodimers) from the features extracted from multiple sequence alignments (MSAs) and the intra-chain distance maps of predicted tertiary structures of monomers. Tested on two homodimer test datasets, CDPred achieves the precision of 61.56% and 43.26% for top L/5 inter-chain contact predictions (L: length of the monomer in homodimer), respectively, which is substantially higher than DeepHomo 37.40% and 23.08% and GLINTER 48.09% and 36.74%. And tested on the two heterodimer test datasets, the top L/5 inter-chain contact prediction precision (L: length of the shorter monomer in heterodimer) of CDPred is 47.59% and 22.87% respectively, which surpasses GLINTER 23.24% and 13.49%. Moreover, we demonstrate that the residue-residue co-evolutionary features calculated from multiple sequence alignments by a deep learning language model are more informative for the inter-chain contact prediction than the traditional statistical optimization approach of maximizing direct co-evolutionary signals, and large intra-chain distances in the intra-chain distance maps of monomers are more useful for the inter-chain distance prediction than small intra-chain distances.