Article 2, Section 2, Clause 2 of the US Constitution:
and [the President] shall nominate, and by and with the Advice and Consent of the Senate, shall appoint Ambassadors, other public Ministers and Consuls, Judges of the supreme Court, and all other Officers of the United States, whose Appointments are not herein otherwise provided for, and which shall be established by Law: (emphasis added)
Note that is says “shall” not “may” and it also mentions nothing about the President waiting for the next election, if the election is within a certain timeframe. If the Senate consents to the nomination, then the appointment is made.
The Senate didn’t consent in 2016. Now they do. That is how it was designed to work.