On the page Wire - Arduino Reference we read :
Wire.available()
Description
Returns the number of bytes available for retrieval with receive(). This should be called on a master device after a call to requestFrom() or on a slave inside the onReceive() handler.
I suggest to replace receive() by read() according to the last syntax in order to avoid confusion. Nothing to change with onReceive() which a right syntax.