The North Korean leader used the trip to reaffirm ties with its powerful neighbor.