Comparator doesn't swing, is there problem with circuit?
TL331 datasheet section 9.2.2.1 says that your input voltage range can go up to Vcc-1.5V.  And if both exceed the allowed range the output will be low.

Maybe there is a part that includes the positive rail that (edit: fixed type) will work instead?  Or power it off 5V.