First, make sure your VM has access to the internet, for example with ping 8.8.8.8
Then do sudo nano /etc/apt/sources.list
The file should include a line that is exactly this: deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware
(or it could have kali-last-snapshot in place of kali-rolling)
If not, replace everything in the file with the line above and save the file with Ctrl+O, then close the editor with Ctrl+X
Then run: