I think you ment BlockPos, not BlockState.
OP, how do you know that this does not work? Did you place a breakpoint after those 2 if statements and it is not being triggered? Because there are more thing that would stop your structure from spawning later down the line. Those 2 checks apart from creating a new BlockPos object every time(don't do that btw) look fine.
As @Choonster said, do not use getBiomeForCoordsBody.
Why are you comparing classes here? If your intention is making the structure only spawn in the plains biome you can either use BiomeDictionary or directly compare the biome to Biomes.PLAINS.
This will be true if the block above the inital ground height is not air thus forbiding your structure from spawning. Tallgrass, for example...
You do not need this. You can return from a loop directly when your air check fails. With your current code you are just wasting time in the loop if the structure won't generate.
Never use IDs. They can and will change. Blocks class exists for a reason.
getStateFromMeta should not be called. Use BlockStates. A state with meta 0 will most likely be the default state.
This way of spawning structures is very confusing and painful to update/fix later. Use templates if they are available in whatever version you are modding for.
Do not create a new Random object every time you need to do something. You have an instance of Random passed as an argument.
nextInt returns a value from 0 to the number specified excluding this number. nextInt(15) will return a number from a range of [0-14].
=>
world.getHeight(i, k)
random.nextInt(10) == 0 is much more understandable and does pretty much the same.