It isn't the same thing. The Berlin Wall was to keep people captive inside. A border wall is to keep people from illegally coming into our country. There is a legal way to come in and that should be the only way to come in.
BUT it depends on which side or the wall you're on? To be kept inside mexico? And there were legal ways to traverse east and west Berlin. just an a afterthought sorry to go on :)
A wall we build will be to keep people from illegally crossing the border from Mexico into the USA. People on the USA side can always leave, unless Mexico stops them. The Berlin Wall was not to stop immigration; it was to keep people from escaping. The two walls have nothing in common except maybe concrete/steel.