Welcome to the Forum. Swollen lymph nodes are a non-specific finding which could be due to many, many things including any of a large number of infections both viral and bacterial, as well as due to allergic reactions, due to autoimmune disorders and other problems. In your case swollen lymph nodes in your groin may be due to an ingrown hair or shaving, due to an STD, or due to some other non-specific finding. The relationship of these nodes to your recent sexual exposure may be coincidence. It is most unlikely that the nodes you describe are due to syphilis. While swollen lymph nodes can be due to syphilis, they are typically painless. That your nodes are swollen suggests that there is some sort of active process going on. My advice would be to see your doctor for evaluation.
Hope this helps. EWH