Captain Janeway is assimilated by the Borg in the Voyager two-part episode "Unimatrix Zero" (Season 6, Episodes 26 & 27 / Season 7, Episode 1). She, Tuvok, and Torres are deliberately assimilated to infiltrate the Borg collective.
The episode "The Gift" (Season 4, Episode 1) deals with Seven of Nine's de-assimilation, not Janeway's capture.