Yes, he did say that. However, now that the house has passed it, it will be easy to have it come down to the Democrats in the Senate. If the Senate doesn't pass funding for the wall, they have to go back to the house which already passed it. So Trump won't have to do anything.
As far as the wall, the only purpose of the wall is to stop illegals, stop human trafficking, and drugs.