Reconfigurable intelligent surface (RIS) is a radical and cost-efficient technology to improve energy efficiency and mitigate interference in the heterogeneous network. In this paper, the resource allocation problem of sub-channels, transmit power and RIS coefficients is investigated in the RIS-aided heterogeneous network. To solve the formulated mixed integer nonlinear programming problem, a two-step centralized resource allocation algorithm and a two-step distributed resource allocation algorithm are proposed based on the alternating optimization method. In the centralized algorithm, the sub-channel allocation, transmit power and RIS coefficients are optimized by the macro base station solely, where the non-convex power optimization problem is transformed into a convex one based on the convex approximation method. In the distributed algorithm, which aims to alleviate the computational burden of the macro base station, the sub-channel allocation and transmit power are optimized by using the cooperation of all the small base stations and the macro base station. Finally, numerical results are presented to demonstrate the convergence of the proposed algorithms and the effectiveness of the sub-channel transfer. More importantly, it is shown that the centralized algorithm can achieve the higher total throughput, while the distributed algorithm greatly decreases the resource allocation time.