This is now explicitly mentioned as a commandment to Lehi. This isn’t a commandment to Jerusalem. This isn’t a commandment to any of the brass plate prophets. This is a commandment to the leader of the small band of people who are being led out so that they can have a pure lineage (verse 25), that they can avoid the abominations of David and Solomon.