  In the context of the generalized (off-shell) free energy, we explore the
phase emergence and corresponding phase transitions of charged dilaton
$\text{AdS}$ black holes in the gauged Kaluza-Klein (KK) theory where the KK
vector field is gauged such that the fermionic fields are charged under the
U(1)$_{\text{KK}}$ gauge group. The black hole solutions are asymptotic to the
AdS$_D$ geometry and can be realized as the dimensional reduction of the gauged
supergravities on the compact internal manifolds, leading to the restriction as
$4\leq D\leq 7$. By studying the behavior of the generalized free energy under
the change of the ensemble temperature, we determine the thermodynamic phases
and the corresponding phase transitions of black holes. This is confirmed by
investigating the heat capacity at the constant pressure and the on-shell free
energy. In the canonical ensemble, the thermodynamics of black holes can be
classified into three different classes as follows: (i) $D=4$, (ii) $D=5$, and
(iii) $D=6,7$. Whereas, in the grand canonical ensemble, the thermodynamics of
black holes is independent of the number of spacetime dimensions and the
pressure, but depends on the chemical potential $\Phi$. The thermodynamic
behavior of black holes can be classified into three different classes as
follows: (i) $\Phi<1$, (ii) $\Phi>1$, and (iii) $\Phi=1$.
