Here's the policy from
https://www.united.com/ual/en/us/fly...in-cabin.html:
Pets are not permitted in our premium cabins on Boeing 757-200, 767, 777 or 787 aircraft because of limited storage space under the seat.
So that would eliminate all premium cabin for EWR or JFK flights. You might want to check with United whether pets are allowed in Premium Plus cabin, since storage is allowed under the seat there.