I have completed everything you mentioned, and here is an example from GitHub: https://github.com/Tutorials-By-Kaupenjoe/Forge-Tutorial-1.19.3/blob/7-treeGeneration
I would like you to look at the two main classes as follows:
ModConfiguredFeatures, located in the package net.kaupenjoe.tutorialmod.worldgen
ModWorldGenProvider, located in the package net.kaupenjoe.tutorialmod.datagen
If you're using version 1.19.4-45.0.39 without updating to 45.0.40, the mentioned code works fine. However, if you switch to version 45.0.40 and try to add the method ModConfiguredFeatures::bootstrap, there will be an immediate issue. It seems like it cannot accept a method with a parameter as an instance, but it can still work properly with an instance that doesn't have an instant parameter, such as BootstapContext<PlacedFeature>.