Leaving aside why you’d want it (as its manpage makes it sound like it’s a tool for minimizing power consumption on a laptop, which is really never a suitable TrueNAS host), remove sudo from the command, run it as root, and include the full path to the binary (/sbin/powertop).