Aims: To develop a rapid, non-invasive method for predicting Hass avocado maturity using near- infrared diffuse reflectance spectroscopy (NIR-DRS) combined with machine learning algorithms, and to identify the optimal NIR wavelength range for accurate dry matter content prediction. Study Design: An experimental design involving spectral data collection from Hass avocados and the development of machine learning models for dry matter prediction. Methodology: Spectral data from 200 Hass avocados were collected using near-infrared diffuse reflectance spectroscopy (900-2500 nm). To improve the quality of the spectral data and reduce noise, standard normal variate was used to correct for scattering and remove unwanted variability in the spectral data. PCA was then performed to reduce the dimension of the spectral data while retaining the most significant variance. Following preprocessing, machine learning models, including Convolutional Neural Networks (CNN), were trained to predict dry matter content, and the optimal wavelength range was determined for accurate prediction. Results: The CNN model demonstrated superior performance for dry matter prediction with R² of 0.91 in the testing set. The wavelength range of 1000-1500 nm was identified as optimal, offering accurate predictions while reducing computational complexity. This range shows potential for developing cost-effective NIR devices for real-time maturity assessment. Conclusion: NIR spectroscopy combined with machine learning offers a non-invasive, accurate method for predicting avocado dry matter, with potential applications for quality control in the avocado industry. The findings demonstrate that focusing on specific wavelength ranges can lead to more affordable and efficient NIR solutions.