Effect of Local Environment and Stellar Mass on Galaxy Quenching and Morphology at 0.5 < z < 2.0