If I am not mistaken you do not need a ChunkProvider for Structure Generation.
I think the biggest problem you have is that you check if the block is replaceable, why? Instead you should get the first ground block at the x, z position you get, and then tell the game to generate your structure. If there are air blocks or plants underneath then simply replace them with a foundation type of block. Kinda like what Minecraft does with it's village buildings, and then clear above your structure by replacing with air. Not all the way up to build height mind you, maybe a couple blocks if the structure is huge and if not clear until there is nothing connected above it.