Most "ping" problems are likely out of your control: likely ISP or beyond. ISP "fixes" (if applicable) may be limited and beyond the ISP neither you nor they have control.
How is the modem router connected to the ISP? Make and model modem/router?
Any active coax jacks or telephone jacks on the second floor?
If coax or DSL perhaps the incoming connection could be rerouted either inside or outside of the building and into the second floor. Then the modem router could be relocated to the second floor.
Beyond that there are two immediate options - 1st to 2nd floor:
1) Power line adapters: dependent on the connectivity and quality of the electrical system wiring.
2) Wireless: dependent on the structure of the building, the materials of the building, and other surrounding wireless networks. You may be able able to gain some performance depending on the frequency you select and the channels within that frequency.
However, wireless is inherently slower that wired and game play will be affected.