I'm not sure about ESTER but for SOFR, the FED has stated that the way to get forwards is derive them from SOFR futures.
See section A.2 in this paper:
The answer looks to be ...
"Dates must be sorted unique". "Unique", so you can't have repeated dates in the inputs you're passing. You have two copies of 1Y. You probably wanted the second to be 2Y.
"Sorted", so you can't have 18M before 1Y. They have to be in the correct order in time.