I just moved from NYC two years ago and am in the city all the time for work. I have traveled Amtrak and Metro North very frequently.

You have nothing to worry about. There are no drug-sniffing dogs or the like. If there were, they'd be barking like crazy at all the various people walking around with drugs at Penn Station or Grand Central.

NYC cops have a hell of a lot more to worry about than some guy with a joint in his pocket.

Enjoy the trip.