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

He was a member of a special police unit.

After the battle the soldier had trouble rejoining his unit.
different meanings