Diabetes is a chronic condition that affects blood sugar levels and vital organs in the body. Early detection is crucial given the increasing global prevalence of diabetes and the grave risk of complications if not properly managed. Thus, a good prediction system is necessary. Although the Decision Tree (DT) is commonly used for classification, it is less effective with large datasets. We propose hyperparameter optimization of the DT using the Grey Wolf Optimization (GWO), which has exploration and both exploitation capabilities. However, the limited search space of GWO may hinder practical exploration and exploitation, leading to premature optimization. To address this, we propose a modified GWO (MGWO) by adding the Levy distribution function to enhance the movements of alpha, beta, and delta wolves. We also provide GA (Genetic Algorithm) as a comparative algorithm. The fitness value of MGWO is 0.8498, surpassing GWO (0.8373) and GA (0.8492). Evaluation results indicate that MGWO and GA yield similar and superior accuracy compared to GWO. The proposed method outperforms existing ones. Further research is needed to evaluate the impact of varying the number of wolves on optimization performance and classification accuracy.