The Night King and his army's motives are fairly mysterious. But we do know he knows when he is being watched by Bran, and seems to possess some magical abilities.
For instance, the Night King, (probably) in the past, marked Bran when he was checking out their army, negating the wards against them on the Three-Eyed-Raven's Cave.
Being able to know when he is being watched by a warg, and being able to mark Bran makes me believe that he has some sort of abilities related or akin to greenseeing. And greenseeing can take different forms. Jojen for instance, could glimpse the future.
So the obvious answer is that the dead were simply waiting things out, until the lake was frozen enough for them to cross and kill them. And they didn't send the whole hoard over all at once to make sure the ice would hold.
But the less obvious answer is this: the Nightking may know he needs an undead dragon to defeat man, and he may have been waiting to face a dragon that his side could kill. The Nightking might not know the particulars, but he could have an idea of possible futures. This isn't something we know, but it is possible.
You also ask about long-range weaponry. It's true, one of the White Walkers could have launched a spear at them, but we don't know how many spears they have, what it takes to make them and if they are a limited resource. Since these spears appear to the magical in nature (as in they shatter most steel) it might not be worthwhile to them. Common wights are cheap. I don't think their special weapons are.
Also, the White Walkers will be wanting the bodies of the heroes to rez as wights. There's no point in killing them until you can get them, and you can get them with a minimum amount of resource expenditure just by standing there.If you do kill one or two, the others might just burn the body before you can get to them, and that means you wouldn't get the bodies to make wights. In the books, wights seem to retain some semblance of knowledge and skills that they had in life. If I were the White Walkers, the fighting prowess of these guys would make it worth the wait so I could convert them.
In any case, their perception of time is not the same as ours. It's been thousands of years since the last attack, and they can afford to be patient.