The minimum frequency-time unit that can be allocated to User Equipments (UEs) in the fifth generation (5G) cellular networks is a Resource Block (RB). A RB is a channel composed of a set of OFDM subcarriers for a given time slot duration. 5G New Radio (NR) allows for a large number of block shapes ranging from 15 kHz to 480 kHz. In this paper, we address the problem of RBs allocation to UEs. The RBs are allocated at the beginning of each time slot based on the channel state of each UE. The problem is formulated based on the Generalized Proportional Fair (GPF) scheduling. Then, we model the problem as a 2-Dimension Hopfield Neural Networks (2D-HNN). Finally, in an attempt to solve the problem, the energy function of 2D-HNN is investigated. Simulation results show the efficiency of the proposed approach.