You could manipulate the targets such that your target class uses the class index 1 while all other classes are assigned the class index 0.
Afterwards you can treat it as a binary classification and could use e.g. nn.BCEWithLogitsLoss as your criterion.