I also decided after 15 years! yes my first note was 2006! to move to onenote. No hard feelings towards Evernote, just I'm paying for office anyway and use OneNote a lot and direction of travel of evernote seems not to fit with what I want from it. It's just it used to be fun product (I really only use it for fun, I'm not trying to become a productivity ninja or somesuch). So anyways I had 3,000 or so notes so not as many as many and a year ago I experimented and got them into OneNote using the MS tool.
Then had second throughts and deleted much out of OneNote. So then last month decided I would definitely move (my subscription was coming up for renewal) and the one note importer just didn't work at all. (with that error posted above). Tore my hair out, tried the stefan thing and spent hours and hours trying to get it to work. No joy.
Then this week came across OneNoteGem http://www.onenotegem.com/a/addins/onenote-batch.html batch processor.
I have no skills to vouch for this in terms of security so please don't take this as a recommendation.
But, I emailed the chap and he said download it and try it. In free mode it will import one evernote note to one onenote note at a time. That worked for notes, notes with attached files, notes with pdfs. PDFS become just attached pdfs, not displayed.
My OneNote is a Microsoft 365 subscription product, and the client I use (About OneNote) comes up as
Microsoft OneNote for Microsoft 365 MSO (16.0.14326.20384) 64 bit
and I used the OneNote Batch 21 version
Then paid for license, got a license key in 4 hours (it does say they are processed by hand). And then I imported by exporting to ENEX from legacy Evernote one notebook at a time. And then importing into OneNote using this program one notebook at a time. I had one notebook that created 1Gb enex file so I broke that down into 200 notes each. But that meant one was still 400mb.
And it took an hour or so to do this but now it is all done, and every note I've checked has been fine.
I have a sense of nervousness that there is some malware in it, but nothing bad has happened so far and I do have all my notes out of evernote into onenote.