This is both a command and also an exclamation. Moses was telling the people in very strong terms that they were wrong to be afraid, rather than trusting God to protect them. (See: [[rc://en/ta/man/translate/figs-exclamations]])
This is direct quotation. It can also be stated as an indirect quotation: “Then God told Moses to tell the people to move toward the Red Sea.” (See: [[rc://en/ta/man/translate/figs-quotations]])