Thyroid disease remains a significant health concern, necessitating advanced diagnostic tools for swift and accurate identification. The initial step involves preprocessing datasets, employing an Outlier Detection Method with Isolated Forest in conjunction with data normalization techniques to eliminate noise and standardize the data, laying a robust groundwork for subsequent analysis. Subsequently, feature extraction is conducted utilizing an Enhanced AlexNet architecture augmented by a more intricate Chameleon Swarm Algorithm (CSA) model to discern finer patterns within the data, enhancing the discriminative nature of the extracted features. Following this, a feature selection strategy employing hybrid optimization is deployed, amalgamating the strengths of Equilibrium Optimizer and Artificial Gorilla Troops Optimizer (AGTO) into a hybrid model named HAGTEO, aiming to identify the most informative features, thus reducing dimensionality and enhancing classifier efficiency. Ultimately, the Gated Recurrent Unit (GRU) classifier is employed for thyroid disease classification based on the extracted and selected features. Renowned for its capability to capture temporal dependencies, the GRU model further enhances classification accuracy. The proposed framework is subjected to testing on two distinct datasets, demonstrating its efficacy in thyroid disease detection. Experimental outcomes reveal superior performance compared to conventional methods, achieving accuracies of 98.07% and 98.00% for dataset 1 and dataset 2, respectively. As an advanced diagnostic solution for thyroid disease, it holds promising potential.