  Context. Understanding the Milky Way's formation and evolution across cosmic
epochs necessitates precise stellar age determination across all Galactic
components. Recent advancements in asteroseismology, spectroscopy, stellar
modelling, and machine learning, coupled with all-sky surveys, now offer highly
reliable stellar age estimates. Aims. This study aims to furnish accurate age
assessments for the Main Red Star Sample within the APOGEE DR17 catalogue.
Leveraging asteroseismic age constraints, we employ machine learning to achieve
this goal. Methods. We explore optimal non-asteroseismic stellar parameters,
including T$_{eff}$, L, [CI/N], [Mg/Ce], [$\alpha$/Fe], U(LSR) velocity, and
'Z' vertical height from the Galactic plane, to predict ages via categorical
gradient boost decision trees. Training merges samples from the TESS Southern
Continuous Viewing Zone and Second APOKASC catalogue to mitigate data shifts,
enhancing prediction reliability. Validation employs an independent dataset
from the K2 Galactic Archaeology Program. Results. Our model yields a median
fractional age error of 20.8%, with a prediction variance of 4.77%. Median
fractional errors for stars older than 3 Gyr range from 7% to 23%, from 1 to 3
Gyr range from 26% to 28%, and for stars younger than 1 Gyr, it's 43%.
Applicable to 125,445 stars in the APOGEE DR17 Main Red Star Sample, our
analysis confirms previous findings on the young Galactic disc's flaring and
reveals an age gradient among the youngest Galactic plane stars. Additionally,
we identify two groups of metal-poor ([Fe/H] < -1 dex) young stars (Age < 2
Gyr) exhibiting similar chemical abundances and halo kinematics, likely
remnants of the predicted third gas infall episode (~2.7 Gyr ago).
