So, here is a good (commented) guide on nbt structure generation: https://github.com/TelepathicGrunt/StructureTutorialMod
Here we have some other examples (uncommented) of structures loading from nbt data files: https://github.com/Beethoven92/BetterEndForge/tree/master/src/main/java/mod/beethoven92/betterendforge/common
And last but not least, vanilla has a lot of examples regarding structures that are loaded from nbt and placed into the world. You can try looking at the Igloo, which is one of the simplest. Those are all good places to start learning about nbt structures. Come back if you have questions or if you did not understand something