From the context in 2 Corinthians 6, it would appear that there is no direct connection between 2 Samuel 7:14 and 2 Corinthians 6:18 other than a topical reference to “sons and daughters”. My KJV has that same 2 Samuel 7:14 reference, as well as a reference to Isaiah 43:6 which also mentions “sons and daughters” but other than that, there appears to be no other significance. In 2 Samuel 7:14, the “son” reference is to the Messiah and in 2 Corinthians 6:18, the “sons and daughters” reference would be to the believer.
2 Samuel 7: 6-16
6 Whereas I have not dwelt in any house since the time that I brought
up the children of Israel out of Egypt, even to this day, but have
walked in a tent and in a tabernacle. 7 In all the places wherein I
have walked with all the children of Israel spake I a word with any of
the tribes of Israel, whom I commanded to feed my people Israel,
saying, Why build ye not me an house of cedar? 8 Now therefore so
shalt thou say unto my servant David, Thus saith the Lord of hosts, I
took thee from the sheepcote, from following the sheep, to be ruler
over my people, over Israel: 9 And I was with thee whithersoever thou
wentest, and have cut off all thine enemies out of thy sight, and have
made thee a great name, like unto the name of the great men that are
in the earth. 10 Moreover I will appoint a place for my people Israel,
and will plant them, that they may dwell in a place of their own, and
move no more; neither shall the children of wickedness afflict them
any more, as beforetime, 11 And as since the time that I commanded
judges to be over my people Israel, and have caused thee to rest from
all thine enemies. Also the Lord telleth thee that he will make thee
an house. 12 And when thy days be fulfilled, and thou shalt sleep with
thy fathers, I will set up thy seed after thee, which shall proceed
out of thy bowels, and I will establish his kingdom. 13 He shall build
an house for my name, and I will stablish the throne of his kingdom
for ever. 14 I will be his father, and he shall be my son. If he
commit iniquity, I will chasten him with the rod of men, and with the
stripes of the children of men: 15 But my mercy shall not depart away
from him, as I took it from Saul, whom I put away before thee. 16 And
thine house and thy kingdom shall be established for ever before thee:
thy throne shall be established for ever.
In 2 Samuel 7:5-16, God is explaining to David that God does not want David to build a physical house for Him. He mentions that in all the time the tabernacle traveled around with the Israelites in the wilderness, He never once asked anyone to build Him a permanent house. God says that David will not build a house for God but God would build a house for David (v11). The reference to “house” is a reference to the “family” of God and not a physical temple. How will David’s family (house) be built; only through the coming Messiah.
In 2 Samuel 7: 12-13, God tells David that David’s “son” which will proceed from David’s heart and soul, will be the one to build the family for God and David. This “son” is the Messiah.
14 I will be his father, and he shall be my son. If he commit
iniquity, I will chasten him with the rod of men, and with the stripes
of the children of men:
This verse is a reference to the crucifixion (note the rod and stripes of men). God then goes on in v15-16 to reference the eternal qualities of the Messiah’s kingdom, ie, mercy, kingdom and throne would all be established forever. Please note in verse 16 that God says, “THINE” (ie David’s) house and kingdom will be established forever. Obviously, the only way David’s house will be established forever would be through the promised Messiah as none of these were accomplished during Solomon’s reign.
In 2 Corinthians 6, we see Paul is talking about the believer separating themselves from the practices of unbelievers and by continuing to walk by faith, believers will be received by God as His sons and daughters. There is no reference to the Messiah here.