You can write up a system like that in any Turing-complete language. It's really not that complicated. Here's the basic, high-level principle (for one way to do it; you can probably do it other ways):
You have a list of all people waiting for a match. (Not necessarily a List list, but some data structure that can hold multiple people.) When a new applicant shows up, check them against the list and see if you find a suitable match. If so, pull the match off the list and send each player's system a notification that they need to connect with the other system. Otherwise, add the newcomer to the list. If someone gets tired of waiting and disconnects, remove them from the list.
Details of how to implement this will obviously vary quite a bit depending on exactly what your system is doing. In the simplest case, there's no such thing as an unsuitable match, so your waiting list will never be longer than one player. At the other extreme, if your list is likely to contain thousands of players for whatever reason, you might want to look at optimizing the lookup somehow. But in the in-between territory, the technique I just described will probably work well.