I assume that there are two pins involved, pin 7 and another for ground. One of the classic problems could be the two (or more) designations of pins: "board" or "bcm".
When I choose a pair, I usually go for a pin I can use that's next to a ground pin.
BCM 7: board pin 26 and board pin 25, for example
BCM 4: board pin 7 and board pin 9, for example
So if you say "pin 7" that could mean two different things. And of course, if you're not using the printed numbers on the Pi since they're too small, make sure that you're counting correctly from the correct end of the 40-pin header and from the top side of the board.
I'm pretty sure there's more than one filament runout plugin so it would be better to know which one you chose.
And yet, I see that the connector side of that has three wires (normally-closed, ground, normally-open). In a case like this, you'd want to decide for example that having filament present closes the normally-open side of this switch. I would use a multimeter on the resistance setting to see which side is a short to ground when filament is inserted. Let's assume that this is the red/green pair of wires. Then you'd want to make sure that the connector adjacent to the red wire is connected to whichever one of these is supposed to be pin 7. Then the connector associated with green should be connected as well to a ground pin on the Raspberry.