I read an article asserting that nuclear force is a short range force because of gluon's mass, and EM force is a long range force because photons massless. I also want to know, why quantum confinement is a consequence gluon's mass?
I think your question can be reframed, gluon and photon both are massless. In a general statement, one can say that interaction range $\propto$ 1/( gauge bosons mass). That is true for electromagnetism and electroweak both. But in case of QCD though gluons are massless the interaction is short ranged. This is the interplay between abelian nature of the theory and confinement. There is no direct relation between confinement and gluon mass (As far my knowledge is concerned).