As suggested the first thing to do would be consider getting your desired functionality into SpongeAPI, though if you do need to access internal classes then it’s quite simple.
I suggest you create a forge environment and include spongeforge as a dependency.
You can find ForgeGradle docs here: https://forgegradle.readthedocs.io/en/latest/
and a template build.gradle in forge
To add spongeforge as a dependency, put
compile 'org.spongepowered:spongeforge:{spongeforge_version}:dev'
in your dependencies. Example version: “1.11.2-2201-6.0.0-BETA-2040”
then run the gradle task setupDecompWorkspace to create the forgegradle workspace (or setupDevWorkspace if you don’t need to decompile MC sources)