It is because of the length of the private key is not correct, or the private key setting cannot be found:

Too Long:

Untitled

Suppose your private key is 12345678901234567890123456789012 , so inside .env file:

PRIVATE_KEY=12345678901234567890123456789012

Maybe you have included other symbols like < or > , remove them.

Too Short

Check if you have used the wallet address (public key).

.env is not located at the project root directory

Although the path of .env is configurable, it is simper to move the file to the project root directory.