The specific Set Render Custom Depth that you have selected has a target for Primitive Components. Try to pull a line from the Static Mesh and release it somewhere empty on the grid, then search for Set Render Custom Depth. Hopefully this will allow you to connect them.
If this doesn’t work for you, perhaps the Static Mesh isn’t of the class static mesh. I managed to do what you wanted to do: