  The present study focuses on analyzing the generalized free energy function
of the $D$-dimensional charged Gauss-Bonnet AdS black holes. We examine the
fluctuating black holes that are in contact with thermal baths at an arbitrary
ensemble temperature, resulting in the corresponding Euclidean geometry with a
conical singularity at the event horizon. By properly regularizing the conical
singularity, we have derived the generalized free energy of the fluctuating
black holes in the canonical ensemble using the Euclidean gravitational path
integral approach. We demonstrate that the derived generalized free energy is
consistent with the definition from thermodynamic perspective. Then we explore
the free energy landscapes of the charge Gauss-Bonnet black holes in diverse
spacetime dimensions and examine the corresponding thermodynamics of the black
hole phase transition. Finally, we discuss the generalized free energy
landscape of the fluctuating black holes in grand canonical ensemble.
