The following does not work:
Is my syntax incorrect?
Yes. I’d recommend reading the help docs for Run code. You cannot pass arguments into the query.
For metafields, I’d recommend adding a “Log output” action to the workflow and then add a metafield variable to the Log output action (choose productVariant / metafield, not metafields, and then choose the metafield you want from the list). That will add the metafield “alias” to your workflow and then you will see it in Run code.