Detection of GeV Gamma-Ray Emission in the Direction of HESS J1731-347 with Fermi-LAT