Let $R$ be a commutative Noetherian ring, $\mathcal Z$ be a stable under specialization subset of $\Spec R$. It is introduced in \cite{DFT}, the concept of $\mathcal Z$-cofiniteness of an $R$-complex $X\in \mathcal D(R)$. Also it is proved in \cite[Theorem 4.7 (i) and (ii)]{DFT} that if (a) $R$ is semilocal with $\cd(\mathcal Z,R) \leq 1$ or (b) $\dim \mathcal Z \leq 1$, then the local cohomology module $\lc^{i}_\mathcal Z(X)$ is $\mathcal Z$-cofinite for all $R$-complex $\mathcal{D}_{\sqsubset}^f(R)$ and all $i\in \Bbb{Z}$. In this paper, we continue to study $\mathcal Z$-cofiniteness of an $R$-complex $X\in \mathcal D(R)$ and we generalize (b) to a large class of modules which recover the condition of (b). We prove that $\lc^{i}_\mathcal Z(X)$ is $\mathcal Z$-cofinite for all $i\in \Bbb Z$ whenever $X\in \mathcal D_{\sqsubset}^f(R)$ with $\cd(\mathcal Z,X)\leq 1-\sup X$. We also prove that if $(R,\fm)$ is local, then for any complex $X\in \mathcal D_{\square}^f(R)$,~~$\lc^{\dim_R{X}}_\mathcal{Z}(X)$ is $\mathcal Z$-cofinite.