Can you marry someone that you know will end up in a divorce which means for a temporary time? Will the Sheva Brochos be a Baracha Levatella? Binyan Adai Ad?
The brachos will not be in vain as Chazal instituted they be said for every marriage, even a temporary one.
However there is a prohibition to marry a woman who one plans to divorce, even if he decided to divorce his wife living together with intimacy is prohibited. There are some opinions that if it is with mutual agreement a couple may get married with intent to be divorced after a set time.
See Aruch Hasulchan Even Haezer 119:9-10, who compiles all the opinion on this matter.