The fifth generation cellular networks are required to provide very fast and reliable communications while dealing with the increase of users traffic. In heterogeneous networks (HetNets) assisted with device-to-device (D2D) communications, traffic can be offloaded to small base stations or to users to make content delivery faster and alleviate the traffic burden from the core network. In this paper, we aim to maximize the probability of successfully delivering files to users, referred to as the successful delivery probability, by jointly optimizing the caching placement and channel allocation in cache-enabled D2D-assisted HetNets. First, an analytical expression of the average content delivery delay is derived. The latter is subsequently used to formulate the joint optimization problem of cache placement and channel allocation. Due to the problem's non-convexity, a linearization transformation is proposed, which allows to find the optimal solution. However, given the high complexity of the problem, we propose a lowcomplex heuristic approach for channel allocation and caching. Numerical results illustrate the efficacy of the proposed solutions and compare them to the conventional HetNet. Finally, the impact of several key parameters, e.g., transmit power, caching capacity, and QoS requirements, is investigated, which provides design guidelines for D2D-assisted HetNets.