I created context menu for TreeView Node but I face a problem how I can create context menu for different tree nodes?

Is there any way to solve this?
See https://www.marshall.edu/genomicjava/2013/12/30/javafx-tableviews-with-contextmenus/ which does something similar for TableViews. You can adapt the ideas there to work with a TreeView.
You can define a custom TreeCell factory on your TreeView. This custom factory will build a custom TreeCell, and, this custom cell can define the context menu as expected.
This answer shows how to create these custom pieces of building blocks :-).