For P2SH-P2WPKH addresses (Addresses starting with "3")Just add
p2wpkh-p2sh: directly in front of your private key.
For example
p2wpkh-p2sh:5BitcoinPrivateKey
This should generate the corresponding p2wpkh-p2sh bitcoin address.
For P2WPKH addresses (Bech32, starting with 'bc1')This time we'll add
p2wpkh: in front of the private key.
For example
p2wpkh:5PrivateKey
This should generate the corresponding Bech32 address