Cannot kill a process that occupies a port

I want to access to the tensorboard’d log files on a remote server. My local machine has windows 10. I use terminal and this command ssh -L 16006:127.0.0.1:6006 ... to connect to the serve and then use tensorboard --logdir Runs --port 6006 when I’m one directory higher than Runs. However, I get this error ERROR: TensorBoard could not bind to port 6006, it was already in use. Before I used to solve this issue with using lsof -i:6006 to get access to the occupying PID and then killing that process by using kill -9 PID. Now, using lsof does nothing. Is there a solution to this? I tried terminating the VSCode occupied ports (I sometimes use VSCode to access to the logs) but I still get the message that the port is occupied.