That quote goes on to give the point, you cannot serve God and money.
There are all kinds of biblical examples of devout men who were soldiers.
Jesus praised the Roman Centurion for having more faith than anyone else in Israel.