It seems you're using XPath 2.0 as XPath 1.0 does not support date functions.
Your mistake is that you cannot access substrings using sequences, use substring(from, length, start)
.
I stripped your problem down to finding a year element within that range and added some whitespace to make the answer less complex, I guess this will be easy for you to extend.
//year[
substring(., 1, 4)[
year-from-dateTime(current-dateTime()) - 1 <= .
and year-from-dateTime(current-dateTime()) + 1 >= .
]
]