Effects of nonlocality on transfer reactions