Eden's garden had a sword at the entrance.
Joshua was ready to enter Canaan, and saw an angel with a sword.
Heb 4 says we must enter the rest, and mix the word with faith, because the word is a sword we require at the entrance to CUT AWAY UNBELIEF so we enter.
Joshua's day saw the unbelief die off when a whole generation of doubters died. Then Israel could enter... past the sword. Circumcision had not been undertaken for the 40 years in the wilderness, so the knife cut and removed the flesh. Joshua was told by the angel that the angel was not FOR HIM or FOR his enemy. The angel was CAPTAIN. All of these factors are related. FLESH and PRIDE and UNBELIEF must go, so we trust God to lead. Then we can enter.
The sword at the entrance means self cannot save self. God's word must cut away the unbelief in our hearts that thinks we can somehow save ourselves, and realize instead that the WORK OF THE CRoSS SAVES. Self must be denied to believe the cross saves and not our piddly two cents' worth of good works. Unless we FULLY believe in the work of the cross, we aren't getting in. So, the word is there to cut out the unbelief by preaching faith in the blood to our hearts. And that lets us enter!
The book of Revelation has the same tree of life Eden had, but it's in a city built by the Last Adam, Christ. But before all of that, Christ stands in
Rev 1 with a sword coming from his mouth. That's the WORD of Christ that cuts away unbelief so we can ENTER this New Jerusalem!