Take a look at the private keys from your Bitcoin Core client. They should look like mine (the following are keys from the testnet):
cQHjhLkGQHQZUZFZYHfXjsXkfdNPoAd2X58sa2x95vEWssrvpPLi
cVXThnV4XgJP7q1v3aVQacTkxHq96BpyoSCGPqMAyyJcVaGn93Zh
cVCAYjR4E5qvzCa3f6VYZhsZNCgWQUDikfFCg4Fom6fnecRXxKM5
Now go to your Electrum and take a look at your keys there (Wallet>>Private keys>>Export, you will find them to the right from your addresses). The should look more or less like mine:
p2wpkh:cNs6rHM6cd7iY3YizmpG2GHxctjKxFtLV9WANCLgtcCRzcQ8AC1b
p2wpkh:cSGaa8sWKSvSty6bR36XZzEQsMr5bNW78XYCaTs3h4xqbsoLGghx
p2wpkh:cTERSrc4euSox7Wtk75vVFwLBpf7oqbpwQPTxNGoEjLxjwL8JrMJ
They look like of a different type than the ones from your Bitcoin Core wallet.
A single private key can lead to different addresses, depending on the script it is used in - these include p2pkh, p2wpkh, p2sh-p2wpkh. To realize that it is true create a new wallet in Electrum (File>>New/Restore>>Create..,choose option Import Bitcoin addresses or private keys) paste the unprepended private key from your Bitcoin Core wallet. Electrum should create a new non-HD wallet for you with only one address. This adrress will be a different one from the one from which you derrived your private key in Bitcoin Core client
Electrum prepends the script type to the private key during export and import so that it knows which address to derive and check for outputs on.
Before sweeping prepend the private key from your Bitcoin Core wallet, that you got from the output of dumpprivkey "address"
, with p2wpkh:
, like so: p2wpkh:cNbxok3SkFuSsbiiTqLj56Hp6bAhr2uJtr8aTkViBB3ghBMzQH3Y
. Such prepended key paste into the sweep box and follow the instructions. You can replace the address given to you by Electrum with the one of your choice - it will work as well.
What is convenient in sweeping is that it will work even if you do not have any Bitcoin in your destination wallet. The fee will be taken from the source, in your case the UTXO from the address of your Bitcoin Core client.