The molecular gases in the interstellar medium are observed as Giant Molecular Clouds, isolated Bok globules and/or Infrared Dark clouds. The substructure of the molecular clouds have complex morphologies from layers to filaments and spheres. On the other hand, the molecular clouds are affected by the heating and cooling mechanisms. Nejad-Asghar~(2019) showed that by consideration of the heating due to ambipolar diffusion in the molecular clouds, the local thermal balance leads to a local loosely constrained power-law relation between the pressure and density as $P \propto \rho^{1+\chi}$, where $-0.4\leq \chi\leq 0.05$ depends on the functional form of the net cooling function. Physically, the value of $\chi$ depends on the power of dependence of magnetic field to the density, and also on the value of magnetic field gradient. For strong magnetic field and/or large field gradient, the value of $\chi$ decreases, and vice versa. For simplicity, here, we use stratified layer approximation to investigate the effect of the non-isothermal parameter $\chi$ on the substructure of the molecular clouds. The results show that considering the non-isothermal equation of state with smaller $\chi$ (i.e., stronger magnetic field and/or larger field gradient) will transfer the magnetic field lines to the outer cloud regions, and hence will decrease the density in the central regions of the cloud. We conclude that the stronger magnetic field and/or larger field gradient can disperse the density fluctuations through the molecular clouds.