yeah your transfer case is shot, either the inside is all chewed up or the splines of the differential in the transmission are gone. Do a search in this forum there is a lot of threads about this.
If it was the connetor on the rear diff, the 4wd light would always be on. The flashing light is...