You are correct. It just means to finish the assignment before that time.
A classic example of this is how their are two types of students: those who procrastinate and those who don't. Where the students who like to procrastinate will usually wait till the last minute/hour/day to get the assignment done and those students who like to get things done right away will likely have the assignment all the way done or almost completed soon after it was assigned.
So if a teacher says "You have until 3pm Monday September 8th to turn in the assignment", it means the same thing as "Turn in the assignment by 3pm Monday September 8th".
So it's just assumed that any assignment that is turned in later than that time will not be accepted by the teacher and the student will get a score of 0. However, depends on the teacher/circumstances/etc, but is besides the point.
Most people wouldn't say
Complete the assignment by next week
Complete the assignment by next year
since they are not specific times/dates.
People would normally say
Complete the assignment by the end of the week
Complete the assignment before next year