Did it work in 4.1? To confirm if it doesn't really work, try going to Service Menu by typing *#*#7378423#*#* in Phone then go to Service Tests, then Proximity Sensor. If it says "Detected" when swiping over the sensor, then there's no problem. Then if not, try reflashing the ROM. If it still doesn't work, maybe the problem's in the hardware. It might be better to return it to a service center.