I use MS-Exchange and use several different Macs and devices with it. On one recently, an iMac, I got that same error message for a message that I was trying to delete.
If you can access your Inbox via the web-based interface, try that and make sure the message(s) you want deleted have been deleted. If not, delete them there and recheck in Apple Mail after quitting Apple Mail and then reopening it.
If that error still persists on your Mac under Mail, try selecting that Junk mailbox and select Rebuild under the Mailbox menu in Apple Mail. That is how I resolved my issue.