Is using gym treadmills similar to walking outside.?

Similar. Definitely not the same workout. Not as interesting and not as environmentally stimulating.
Similar... ...although the surface of the treadmill upon which you run is more forgiving to the joints than the concrete roads and walkways, and is more predictable than the uneven surfaces of trails or under grass. And with a treadmill, you control the hills. .