No, that was a typo which @vmirly1 already corrected.
You should pass logits to nn.BCEwithLogitsLoss and probabilities (using sigmoid) to nn.BCELoss.
Also, make sure to pass the model output first and then the target to the criterion.