The statute doesn't say much in detail (from the New York State Vehicle and Traffic Law (unfortunately, the site works on javascript, so, you have to navigate by opening the "Laws" menu and then making your way from there):
§ 1128. Driving on roadways laned for traffic. Whenever any roadway
has been divided into two or more clearly marked lanes for traffic the
following rules in addition to all others consistent herewith shall
apply:
(a) A vehicle shall be driven as nearly as practicable entirely within
a single lane and shall not be moved from such lane until the driver has
first ascertained that such movement can be made with safety.
(b and c are not relevant)
(d) When official markings are in place indicating those portions of
any roadway where crossing such markings would be especially hazardous,
no driver of a vehicle proceeding along such highway shall at any time
drive across such markings.
The last bit, (d), is of interest. Basically, you are allowed to change into the correct lane as long as the pavement markings permit it. The pavement markings at an intersection with a sign like the one you posted are generally solid white lines. These details are governed by the Manual on Uniform Traffic Control Devices, published by the Federal Highway Administration. Their information on pavement markings is available both in PDF and HTML format. Pertinently, it says:
A double white line indicates that lane changes are prohibited. A single white line indicates that lane changes are discouraged. A dashed white line indicates that lane changes are allowed.
Therefore, if the lines separating the lanes are, as usual, solid white lines, you are encouraged to get into the correct lane before the beginning of the solid white line, but you are permitted to change lanes across the solid lines. An example of such marking is in the right-hand example in the given image:

One point of possible contention is that the New York State Driver's Manual describes the meaning of the solid white line somewhat differently:
One solid line: You can pass other vehicles or change lanes, but you can only do so when obstructions in the road or traffic conditions make it necessary.
I don't see any statutory basis for that description, but I may well have overlooked something.
I suppose you know where the signs are specified, since you probably got the image from there, but for anyone reading this who does not know, they are specified in the publication Standard Highway Signs. This is available as a set of PDF files; the relevant file is the one containing regulatory signs; the sign in the question is 1-33, and it is in the midst of several similar signs.
If a police officer ticketed you for getting into the lane too late, I suppose you should find a lawyer who specializes in fighting traffic tickets, and ask whether there really is such a thing as "too late." By my reading of the law, there isn't. (Of course, if it's dangerous to change lanes because of other vehicles, you shouldn't change lanes, but if you had, I would suppose the officer should have written a ticket for some other violation, like reckless driving.)