A joint venture has sold a 504-unit apartment complex about five miles north of the Bergen County border, in a transaction arranged by JLL’s Morristown-based capital markets team.