Is the word "avoid" used in the same way in the following two sentences?

I try to avoid the company of gamblers.

He avoided going to the area.
the same meaning