The internal alkyne is a little bit more stable and might form faster at first. But formation fo the internal alkyne is reversible.
But there is a proton transfer at the end of the mechanism that causes the formation of the terminal alkyne to be irreversible. The amide ion (NH2-) is a strong enough base to deprotonate a terminal alkyne.
If a weaker base such as sodium hydroxide is used for the elimination, then an internal alkyne will be the major product. That's because hydroxide is not a strong enough base to deprotonate a terminal alkyne.
This is discussed in the organic chemistry textbook by Wade, and probably others.