Well there was no harm in even using BCELoss, just you had to read the what exactly are inputs  it expects. For getting prediction labels, you can use torch.argmax. If you think your issue is solved, please mark the answer as solution.
One-hot encoding is required to compute the loss but that is taken care of by the pytorch loss function itself. So I would say your understanding was right but you need to change data representation as expected by the function :).