You cannot marry One Direction.
One Direction is a five-member boy band (Harry Styles, Liam Payne, Louis Tomlinson, Niall Horan, formerly Zayn Malik)—not a single legal entity. Marriage is a contract between two individuals.
You could marry one member (if they propose, you accept, and laws permit). Several members are married: Harry (no), Liam (no), Louis (no), Niall (no), Zayn (no)—as of 2024, none are married to fans.
Fandom love ≠ legal marriage. Enjoy the music!