While searching the web, I can see that this message tells you that you are using a wrong version of TWRP.
They said, first flash the latest nougat (from xperifirm), boot the phone to the end, shut it down, and then retry to flash the latest TWRP.
I updated the firmware with flashtool and xperifirm. I could finally install TWRP 3.2.1.
I'll sideload lineage os this evening.