Your transmission fluid doesn't have much to do with your fuel mileage on your vehicle.
However if your transmission fluid is dirty or your transmission fluid filter is clogged then it could cause shifting problems meaning that you'd have to wait longer before your vehicle shifts up to gears.
So that means that you may be putting your foot on the gas pedal trying to accelerate and your engine RPM would go up but your vehicle would not pick up speed.
So in that way your vehicle would use more gasoline because your vehicle would take longer to pick up speed.
If your transmission fluid hasn't been changed in 30,000 or more miles then it would be a good idea to change the transmission fluid and filter.
Then your transmission should shift much easier and if not then you have something wrong with your automatic transmission and it may need rebuilt.
Transmission fluid changes are necessary to keep your transmission operating properly and make it last longer and it's often overlooked unlike the engine oil.
The transmission fluid and filter needs changed as well but just less often than engine oil and engine oil filter.
I change my transmission fluid and transmission filter every 20,000 to 30,000 miles and have a transmission in a vehicle going on for 500,000 miles.