The feature states "a weapon attack" in general, What if the weapon attack is a thrown one like a spear or a javelin?
The full text states:
Once on each of your turns when you make a weapon attack, you can make another attack with the same weapon against a different creature that is within 5 feet o f the original target and within range of your weapon. (PHB p.93)