Hello,
It sounds like the Suppress Endnotes setting might be active for that section. This layout setting overrides it and pushes them forward to the end of the document.
Go to the Layout tab on the main ribbon, then click the small arrow in the bottom right corner of the Page Setup group to open the dialog window. Click on the Layout tab inside that window. Make sure the Suppress endnotes checkbox is unchecked. You should verify this setting is off for every section where you want the notes to stay put.
Let me know if that fixes the positioning!