Hi,
There has probably been a change in the API for Revit 2021. Try instead with the Wall ByCurveAndLevel node.