A busy main road through Wiltshire is set to close to traffic for “urgent” works.