If you occupy the capital of a co-belligerent from another faction, they should be in the peace conference (so eg. after historical WWII, Soviets can puppet occupied Poland even though it was part of the allies). If you occupied Copenhagen and Amsterdam, that would have put Denmark and the Netherlands (assuming they were in the allies) into the peace conference as if they were defeated, but it shouldn't of automatically given you any land. Sounds like it might be a bug.
As for why you can't release them though, as said above, it's likely both still exist in their colonies (Curacao, Dutch Suriname, Iceland/Greenland/Faroes, etc.). Have you checked if you can return the territory in question to them (through the return core territory interaction)?