Use the community commons YearsBetween function for this.
Regards,
Ronald
Or just plain Mendix https://docs.mendix.com/refguide/between-date-function-calls#9-calendaryearsbetween