The bill, which President Biden is expected to sign Monday, is likely to fund road and bridge repairs, water infrastructure upgrades and airport expansions.
New York City's sanitation department unveiled a fully electric street sweeper last week.
Fans of the devices say they are a cheap way to travel. But other New Yorkers view them as a nuisance or worry about the risks they pose.
The addition of 2,000 electric vehicles to the city's fleet will reduce gasoline consumption by 2.5 million gallons a year.
The roadmap plans to make 4,412 vehicles in the city's taxicab fleet emission-free.