You should pass an instance in for this it seems, not a constructor.

If it feels like it's hard to make this work passing in a Transform instance, you can also just use the static "StateToContetn.transform" method.